OpenQuizz
Une application de gestion des contenus pédagogiques
pip._internal.utils.filesystem Namespace Reference

Functions

def check_path_owner (path)
 
def copy2_fixed (src, dest)
 
def is_socket (path)
 
def adjacent_tmp_file (path, **kwargs)
 
def test_writable_dir (path)
 
def find_files (path, pattern)
 
def file_size (path)
 
def format_file_size (path)
 
def directory_size (path)
 
def format_directory_size (path)
 

Variables

 reraise
 
 True
 
 stop
 
 wait
 
 replace
 

Function Documentation

◆ adjacent_tmp_file()

def pip._internal.utils.filesystem.adjacent_tmp_file (   path,
**  kwargs 
)
Return a file-like object pointing to a tmp file next to path.

The file is created securely and is ensured to be written to disk
after the context reaches its end.

kwargs will be passed to tempfile.NamedTemporaryFile to control
the way the temporary file will be opened.

◆ check_path_owner()

def pip._internal.utils.filesystem.check_path_owner (   path)

◆ copy2_fixed()

def pip._internal.utils.filesystem.copy2_fixed (   src,
  dest 
)
Wrap shutil.copy2() but map errors copying socket files to
SpecialFileError as expected.

See also https://bugs.python.org/issue37700.

◆ directory_size()

def pip._internal.utils.filesystem.directory_size (   path)

◆ file_size()

def pip._internal.utils.filesystem.file_size (   path)

◆ find_files()

def pip._internal.utils.filesystem.find_files (   path,
  pattern 
)
Returns a list of absolute paths of files beneath path, recursively,
with filenames which match the UNIX-style shell glob pattern.

◆ format_directory_size()

def pip._internal.utils.filesystem.format_directory_size (   path)

◆ format_file_size()

def pip._internal.utils.filesystem.format_file_size (   path)

◆ is_socket()

def pip._internal.utils.filesystem.is_socket (   path)

◆ test_writable_dir()

def pip._internal.utils.filesystem.test_writable_dir (   path)
Check if a directory is writable.

Uses os.access() on POSIX, tries creating files on Windows.

Variable Documentation

◆ replace

replace

◆ reraise

reraise

◆ stop

stop

◆ True

True

◆ wait

wait