Renamed parameter 'input_file_system_path' to 'path_to_input_directory' for clarity.
This commit is contained in:
@ -239,7 +239,7 @@ def copy_file_in_group(source_file_path, dest_file_obj : h5py.File, dest_group_n
|
||||
os.remove(tmp_file_path)
|
||||
|
||||
def create_hdf5_file_from_filesystem_path(output_filename : str,
|
||||
input_file_system_path : str,
|
||||
path_to_input_directory: str,
|
||||
select_dir_keywords = [],
|
||||
select_file_keywords =[],
|
||||
top_sub_dir_mask : bool = True,
|
||||
@ -257,7 +257,7 @@ def create_hdf5_file_from_filesystem_path(output_filename : str,
|
||||
----------
|
||||
output_filename : str
|
||||
Name of the output HDF5 file.
|
||||
input_file_system_path : str
|
||||
path_to_input_directory: str
|
||||
Path to root directory, specified with forward slashes, e.g., path/to/root.
|
||||
select_dir_keywords : list
|
||||
List of string elements to consider or select only directory paths that contain
|
||||
@ -278,17 +278,17 @@ def create_hdf5_file_from_filesystem_path(output_filename : str,
|
||||
"""
|
||||
|
||||
allowed_file_extensions = filereader_registry.file_extensions
|
||||
if '/' in input_file_system_path:
|
||||
input_file_system_path = input_file_system_path.replace('/',os.sep)
|
||||
if '/' in path_to_input_directory:
|
||||
path_to_input_directory= path_to_input_directory.replace('/',os.sep)
|
||||
else:
|
||||
raise ValueError('input_file_system_path needs to be specified using forward slashes "/".' )
|
||||
raise ValueError('path_to_input_directory needs to be specified using forward slashes "/".' )
|
||||
|
||||
for i, keyword in enumerate(select_dir_keywords):
|
||||
select_dir_keywords[i] = keyword.replace('/',os.sep)
|
||||
|
||||
# Copy input_directory into the output_dir_path, and work with it from now on
|
||||
output_dir_path = os.path.splitext(output_filename)[0].replace('/',os.sep)
|
||||
path_to_filenames_dict = utils.copy_directory_with_contraints(input_file_system_path,
|
||||
path_to_filenames_dict = utils.copy_directory_with_contraints(path_to_input_directory,
|
||||
output_dir_path,
|
||||
select_dir_keywords,
|
||||
select_file_keywords,
|
||||
|
Reference in New Issue
Block a user