local_strategy
            LocalDirectoryStrategy
¶
    
              Bases: FileRetrievalStrategy
Strategy for retrieving files from a local directory.
This strategy implements the file retrieval logic for local directories, including optional recursive search through subdirectories and filtering by file extension.
Source code in src/cloe_nessy/file_utilities/strategies/local_strategy.py
                
            get_file_paths(location, extension=None, search_subdirs=True, **kwargs)
  
      staticmethod
  
¶
    Recursively retrieves all files with a specified extension from a given directory and its subdirectories.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| location | str | Top-level directory to read from, e.g., '/Volumes/my_volume/landing/example_landing/'. | required | 
| extension | str | None | File extension, e.g., 'csv', 'json'. Input an empty string to get files without any extension, input None to get all files. | None | 
| search_subdirs | bool | If True, function will also search within all subdirectories. | True | 
| kwargs | Additional keyword arguments. Used in the OneLakeStrategy. | {} | 
Returns:
| Name | Type | Description | 
|---|---|---|
| List | list[str] | List of files in the directory and its subdirectories with the given extension. | 
Raises:
| Type | Description | 
|---|---|
| ValueError | If the location is not provided. | 
| FileUtilitiesError | For any other unexpected errors. |