| Module | base |
Base classes for filesystem and storage implementation |
| Module | helpers |
Helper classes for file system related functions |
| Module | local |
Local file system object |
| Module | mock |
Mock objects for file system classes |
From __init__.py:
| Function | cleanup_filename |
No summary |
| Function | format_file_size |
No summary |
| Function | localFileOrFolder |
Convenience method that resolves a local File or Folder object |
| Constant | FS_CASE_SENSITIVE |
Undocumented |
| Constant | FS_SUPPORT_NON_LOCAL_FILE_SHARES |
Undocumented |
| Variable | logger |
Undocumented |
Undocumented
| Value |
|
Convenience method that resolves a local File or Folder object
If the path is a string and ends with either "/" or "\" it is interpreted as user input and a LocalFolder object will be returned. Else the function will try to sort out whether the path is a file or a folder by checking on disk. This requires the object to exist.
NOTE: for consistency, this function only returns objects for existing files or folders, else it raises FileNotFoundError
| Parameters | |
| path | file path as a string, FilePath object, or list of path elements |
| pwd | working directory as a string, needed to allow relative paths |
| Parameters | |
| name | the filename as string |
| Returns | |
| the name with invalid characters removed | |