Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Functions | Variables
pip._internal.utils.unpacking Namespace Reference

Functions

int current_umask ()
 
List[str] split_leading_dir (str path)
 
bool has_leading_dir (Iterable[str] paths)
 
bool is_within_directory (str directory, str target)
 
None set_extracted_file_to_default_mode_plus_executable (str path)
 
bool zip_item_is_executable (ZipInfo info)
 
None unzip_file (str filename, str location, bool flatten=True)
 
None untar_file (str filename, str location)
 
None unpack_file (str filename, str location, Optional[str] content_type=None)
 

Variables

 logger = logging.getLogger(__name__)
 
 SUPPORTED_EXTENSIONS = ZIP_EXTENSIONS + TAR_EXTENSIONS
 

Detailed Description

Utilities related archives.

Function Documentation

◆ current_umask()

int pip._internal.utils.unpacking.current_umask ( )
Get the current umask which involves having to set it temporarily.

◆ has_leading_dir()

bool pip._internal.utils.unpacking.has_leading_dir ( Iterable[str]  paths)
Returns true if all the paths have the same leading path name
(i.e., everything is in one subdirectory in an archive)

◆ is_within_directory()

bool pip._internal.utils.unpacking.is_within_directory ( str  directory,
str  target 
)
Return true if the absolute path of target is within the directory

◆ set_extracted_file_to_default_mode_plus_executable()

None pip._internal.utils.unpacking.set_extracted_file_to_default_mode_plus_executable ( str  path)
Make file present at path have execute for user/group/world
(chmod +x) is no-op on windows per python docs

◆ untar_file()

None pip._internal.utils.unpacking.untar_file ( str  filename,
str  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.

◆ unzip_file()

None pip._internal.utils.unpacking.unzip_file ( str  filename,
str  location,
bool   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.