Vega strike Python Modules doc
0.5.1
Documentation of the " Modules " folder of Vega strike
|
Data Structures | |
class | dircmp |
Functions | |
def | cmp |
def | cmpfiles |
def | demo |
Variables | |
list | __all__ = ["cmp","dircmp","cmpfiles"] |
dictionary | _cache = {} |
int | BUFSIZE = 8 |
Utilities for comparing files and directories. Classes: dircmp Functions: cmp(f1, f2, shallow=1, use_statcache=0) -> int cmpfiles(a, b, common) -> ([], [], [])
def filecmp.cmp | ( | f1, | |
f2, | |||
shallow = 1 , |
|||
use_statcache = 0 |
|||
) |
Compare two files. Arguments: f1 -- First file name f2 -- Second file name shallow -- Just check stat signature (do not read the files). defaults to 1. use_statcache -- Do not stat() each file directly: go through the statcache module for more efficiency. Return value: integer -- 1 if the files are the same, 0 otherwise. This function uses a cache for past comparisons and the results, with a cache invalidation mechanism relying on stale signatures. Of course, if 'use_statcache' is true, this mechanism is defeated, and the cache will never grow stale.
Definition at line 21 of file filecmp.py.
References aifc.open(), and stat.S_IFMT().
def filecmp.cmpfiles | ( | a, | |
b, | |||
common, | |||
shallow = 1 , |
|||
use_statcache = 0 |
|||
) |
Compare common files in two directories. a, b -- directory names common -- list of file names found in both directories shallow -- if true, do comparison based solely on stat() information use_statcache -- if true, use statcache.stat() instead of os.stat() Returns a tuple of three lists: files that compare equal files that are different filenames that aren't regular files.
Definition at line 272 of file filecmp.py.
References reconvert.append, and cmp().
def filecmp.demo | ( | ) |
Definition at line 16 of file filecmp.py.
dictionary _cache = {} |
Definition at line 18 of file filecmp.py.
int BUFSIZE = 8 |
Definition at line 19 of file filecmp.py.