|
def | __init__ (self, dry_run=False) |
|
def | record_as_written (self, path) |
|
def | newer (self, source, target) |
|
def | copy_file (self, infile, outfile, check=True) |
|
def | copy_stream (self, instream, outfile, encoding=None) |
|
def | write_binary_file (self, path, data) |
|
def | write_text_file (self, path, data, encoding) |
|
def | set_mode (self, bits, mask, files) |
|
def | ensure_dir (self, path) |
|
def | byte_compile (self, path, optimize=False, force=False, prefix=None, hashed_invalidation=False) |
|
def | ensure_removed (self, path) |
|
def | is_writable (self, path) |
|
def | commit (self) |
|
def | rollback (self) |
|
◆ __init__()
def __init__ |
( |
|
self, |
|
|
|
dry_run = False |
|
) |
| |
◆ byte_compile()
def byte_compile |
( |
|
self, |
|
|
|
path, |
|
|
|
optimize = False , |
|
|
|
force = False , |
|
|
|
prefix = None , |
|
|
|
hashed_invalidation = False |
|
) |
| |
◆ commit()
Commit recorded changes, turn off recording, return
changes.
◆ copy_file()
def copy_file |
( |
|
self, |
|
|
|
infile, |
|
|
|
outfile, |
|
|
|
check = True |
|
) |
| |
Copy a file respecting dry-run and force flags.
◆ copy_stream()
def copy_stream |
( |
|
self, |
|
|
|
instream, |
|
|
|
outfile, |
|
|
|
encoding = None |
|
) |
| |
◆ ensure_dir()
def ensure_dir |
( |
|
self, |
|
|
|
path |
|
) |
| |
◆ ensure_removed()
def ensure_removed |
( |
|
self, |
|
|
|
path |
|
) |
| |
◆ is_writable()
def is_writable |
( |
|
self, |
|
|
|
path |
|
) |
| |
◆ newer()
def newer |
( |
|
self, |
|
|
|
source, |
|
|
|
target |
|
) |
| |
Tell if the target is newer than the source.
Returns true if 'source' exists and is more recently modified than
'target', or if 'source' exists and 'target' doesn't.
Returns false if both exist and 'target' is the same age or younger
than 'source'. Raise PackagingFileError if 'source' does not exist.
Note that this test is not very accurate: files created in the same
second will have the same "age".
◆ record_as_written()
def record_as_written |
( |
|
self, |
|
|
|
path |
|
) |
| |
◆ rollback()
◆ set_mode()
def set_mode |
( |
|
self, |
|
|
|
bits, |
|
|
|
mask, |
|
|
|
files |
|
) |
| |
◆ write_binary_file()
def write_binary_file |
( |
|
self, |
|
|
|
path, |
|
|
|
data |
|
) |
| |
◆ write_text_file()
def write_text_file |
( |
|
self, |
|
|
|
path, |
|
|
|
data, |
|
|
|
encoding |
|
) |
| |
◆ dirs_created
◆ dry_run
◆ ensured
◆ files_written
◆ record
◆ set_executable_mode
The documentation for this class was generated from the following file:
- /home/passerat/Stage/flaskProject/venv/lib/python3.8/site-packages/pip/_vendor/distlib/util.py