File utils
Utilities for file name based operations.
get_directory_path(path)
¶
Add '/' to the end of the path of a directory.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
directory to be processed |
required |
Returns:
Type | Description |
---|---|
str
|
Directory path stripped and with '/' at the end. |
Source code in mkdocs/lakehouse_engine/packages/utils/file_utils.py
get_file_names_without_file_type(path, file_type, exclude_regex)
¶
Function to retrieve list of file names in a folder.
This function filters by file type and removes the extension of the file name it returns.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
path to the folder to list files |
required |
file_type |
str
|
type of the file to include in list |
required |
exclude_regex |
str
|
regex of file names to exclude |
required |
Returns:
Type | Description |
---|---|
list
|
A list of file names without file type. |