prefect.utilities.filesystem
¶
Utilities for working with file systems
create_default_ignore_file
¶
Creates default ignore file in the provided path if one does not already exist; returns boolean specifying whether a file was created.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/utilities/filesystem.py
18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
filename
¶
Extract the file name from a path with remote file system support
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/utilities/filesystem.py
72 73 74 75 76 77 78 79 |
|
filter_files
¶
This function accepts a root directory path and a list of file patterns to ignore, and returns a list of files that excludes those that should be ignored.
The specification matches that of .gitignore files.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/utilities/filesystem.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|
get_open_file_limit
¶
Get the maximum number of open files allowed for the current process
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/utilities/filesystem.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
|
is_local_path
¶
Check if the given path points to a local or remote file system
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/utilities/filesystem.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
relative_path_to_current_platform
¶
Converts a relative path generated on any platform to a relative path for the current platform.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/utilities/filesystem.py
116 117 118 119 120 121 122 |
|
tmpchdir
¶
Change current-working directories for the duration of the context
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/utilities/filesystem.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
|
to_display_path
¶
Convert a path to a displayable path. The absolute path or relative path to the current (or given) directory will be returned, whichever is shorter.
Source code in /home/runner/work/docs/docs/prefect_source/src/prefect/utilities/filesystem.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
|