Home | Trees | Indices | Help |
|
---|
|
object --+ | list --+ | FilesystemList --+ | PurgeItemList
List of files and directories to be purged.
A PurgeItemList is a FilesystemList containing a list of files and directories to be purged. On top of the generic functionality provided by FilesystemList, this class adds functionality to remove items that are too young to be purged, and to actually remove each item in the list from the filesystem.
The other main difference is that when you add a directory's contents
to a purge item list, the directory itself is not added to the list.
This way, if someone asks to purge within in
/opt/backup/collect
, that directory doesn't get removed once
all of the files within it is gone.
|
|||
new empty list |
|
||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from Inherited from |
|
|||
Inherited from |
|
|||
Inherited from Inherited from |
|
Initializes a list with no configured exclusions.
|
Adds the contents of a directory to the list. The path must exist and must be a directory or a link to a directory.
The contents of the directory (but not the directory path itself)
will be recursively added to the list, subject to any exclusions that are
in place. If you only want the directory and its contents to be added,
then pass in
Notes:
|
Removes from the list files younger than a certain age (in days). Any file whose "age" in days is less than
( The "age" of a file is the amount of time since the file was
last used, per the most recent of the file's
Note:
Some people find the "sense" of this method confusing or
"backwards". Keep in mind that this method is used to
remove items from the list, not from the filesystem! It
removes from the list those items that you would not want to
purge because they are too young. As an example, passing in
|
Purges all items in the list. Every item in the list will be purged. Directories in the list will not be purged recursively, and hence will only be removed if they are empty. Errors will be ignored. To faciliate easy removal of directories that will end up being empty, the delete process happens in two passes: files first (including soft links), then directories.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Oct 12 09:25:40 2011 | http://epydoc.sourceforge.net |