c1152d8e3ea17c8e9a9dbb803c3c34dfaa15ccd6
[pyutils.git] / docs / pyutils.files.rst
1 pyutils.files package
2 =====================
3
4 Submodules
5 ----------
6
7 pyutils.files.directory\_filter module
8 --------------------------------------
9
10 This module contains two classes meant to help reduce unnecessary disk
11 I/O operations:
12
13 The first determines when the contents of a file held in memory are
14 identical to the file copy already on disk.  The second is basically
15 the same except for the caller need not indicate the name of the disk
16 file because it will check the memory file's signature against a set
17 of signatures of all files in a particular directory on disk.
18
19 .. automodule:: pyutils.files.directory_filter
20    :members:
21    :undoc-members:
22    :show-inheritance:
23
24 pyutils.files.file\_utils module
25 --------------------------------
26
27 This is a grab bag of file-related utilities.  It has code to, for example,
28 read files transforming the text as its read, normalize pathnames, strip
29 extensions, read and manipulate atimes/mtimes/ctimes, compute a signature
30 based on a file's contents, traverse the file system recursively, etc...
31
32 .. automodule:: pyutils.files.file_utils
33    :members:
34    :undoc-members:
35    :show-inheritance:
36
37 pyutils.files.lockfile module
38 -----------------------------
39
40 This is a lockfile implementation I created for use with cronjobs on
41 my machine to prevent multiple copies of a job from running in
42 parallel.  When one job is running this code keeps a file on disk to
43 indicate a lock is held.  Other copies will fail to start if they
44 detect this lock until the lock is released.  There are provisions in
45 the code for timing out locks, cleaning up a lock when a signal is
46 received, gracefully retrying lock acquisition on failure, etc...
47
48 .. automodule:: pyutils.files.lockfile
49    :members:
50    :undoc-members:
51    :show-inheritance:
52
53 Module contents
54 ---------------
55
56 This module contains utilities for dealing with files on disk.
57
58 .. automodule:: pyutils.files
59    :members:
60    :undoc-members:
61    :show-inheritance: