paste.debug.fsdiff
– Show differences between directories¶
Module to find differences over time in a filesystem
Basically this takes a snapshot of a directory, then sees what changes were made. The contents of the files are not checked, so you can detect that the content was changed, but not what the old version of the file was.
Module Contents¶
-
class
paste.debug.fsdiff.
Diff
(before, after)¶ Represents the difference between two snapshots
-
class
paste.debug.fsdiff.
Snapshot
(base_path, files=None, ignore_wildcards=(), ignore_paths=(), ignore_hidden=True)¶ Represents a snapshot of a set of files. Has a dictionary-like interface, keyed relative to
base_path
-
class
paste.debug.fsdiff.
File
(base_path, path)¶ Represents a single file found as the result of a command.
Has attributes:
path
:- The path of the file, relative to the
base_path
full
:- The full path
stat
:- The results of
os.stat
. Alsomtime
andsize
contain the.st_mtime
andst_size
of the stat. bytes
:- The contents of the file.
You may use the
in
operator with these objects (tested against the contents of the file), and the.mustcontain()
method.
-
class
paste.debug.fsdiff.
Dir
(base_path, path)¶ Represents a directory created by a command.
-
paste.debug.fsdiff.
report_expected_diffs
(diffs, colorize=False)¶ Takes the output of compare_expected, and returns a string description of the differences.
-
paste.debug.fsdiff.
show_diff
(actual_content, expected_content)¶