morpheus.utils.file_utils#
File utilities for Morpheus
Functions
|
Date is extracted from a file name using a specified regex pattern by this function. |
|
Get data file path. |
|
Get list of labels from file. |
- date_extractor(file_object, filename_regex)[source]#
Date is extracted from a file name using a specified regex pattern by this function. If there is no match with the pattern, extracts the modified or creation timestamp from the file.
- Parameters:
- file_objectfsspec.core.OpenFile
File object
- filename_regexre.Pattern
Filename regex.
- Returns:
- datetime
Extracted timestamp