|
OpenQuizz
Une application de gestion des contenus pédagogiques
|
Functions | |
| def | current_umask () |
| def | split_leading_dir (path) |
| def | has_leading_dir (paths) |
| def | is_within_directory (directory, target) |
| def | set_extracted_file_to_default_mode_plus_executable (path) |
| def | zip_item_is_executable (info) |
| def | unzip_file (filename, location, flatten=True) |
| def | untar_file (filename, location) |
| def | unpack_file (filename, location, content_type=None) |
Variables | |
| logger | |
| SUPPORTED_EXTENSIONS | |
Utilities related archives.
| def pip._internal.utils.unpacking.current_umask | ( | ) |
Get the current umask which involves having to set it temporarily.
| def pip._internal.utils.unpacking.has_leading_dir | ( | paths | ) |
Returns true if all the paths have the same leading path name (i.e., everything is in one subdirectory in an archive)
| def pip._internal.utils.unpacking.is_within_directory | ( | directory, | |
| target | |||
| ) |
Return true if the absolute path of target is within the directory
| def pip._internal.utils.unpacking.set_extracted_file_to_default_mode_plus_executable | ( | path | ) |
Make file present at path have execute for user/group/world (chmod +x) is no-op on windows per python docs
| def pip._internal.utils.unpacking.split_leading_dir | ( | path | ) |
| def pip._internal.utils.unpacking.unpack_file | ( | filename, | |
| location, | |||
content_type = None |
|||
| ) |
| def pip._internal.utils.unpacking.untar_file | ( | filename, | |
| location | |||
| ) |
Untar the file (with path `filename`) to the destination `location`. All files are written based on system defaults and umask (i.e. permissions are not preserved), except that regular file members with any execute permissions (user, group, or world) have "chmod +x" applied after being written. Note that for windows, any execute changes using os.chmod are no-ops per the python docs.
| def pip._internal.utils.unpacking.unzip_file | ( | filename, | |
| location, | |||
flatten = True |
|||
| ) |
Unzip the file (with path `filename`) to the destination `location`. All files are written based on system defaults and umask (i.e. permissions are not preserved), except that regular file members with any execute permissions (user, group, or world) have "chmod +x" applied after being written. Note that for windows, any execute changes using os.chmod are no-ops per the python docs.
| def pip._internal.utils.unpacking.zip_item_is_executable | ( | info | ) |
| logger |
| SUPPORTED_EXTENSIONS |