CedarBackup3.config.CollectDir

Package CedarBackup3 :: Module config :: Class CollectDir |
[hide private]
[frames] | no frames]

# Class CollectDir

source code

    object --+
             |
            CollectDir

Class representing a Cedar Backup collect directory.

The following restrictions exist on data in this class:

- Absolute paths must be absolute
- The collect mode must be one of the values in VALID_COLLECT_MODES.
- The archive mode must be one of the values in VALID_ARCHIVE_MODES.
- The ignore file must be a non-empty string.

For the `absoluteExcludePaths` list, validation is accomplished through the util.AbsolutePathList list implementation that overrides common list methods and transparently does the absolute path validation for us.

Note: Lists within this class are "unordered" for equality comparisons.

Instance Methods | [hide private]
__init__(self, absolutePath=None, collectMode=None, archiveMode=None, ignoreFile=None, absoluteExcludePaths=None, relativeExcludePaths=None, excludePatterns=None, linkDepth=None, dereference=False, recursionLevel=None) Constructor for the `CollectDir` class. | source code
__repr__(self) Official string representation for class instance. | source code
__str__(self) Informal string representation for class instance. | source code
__cmp__(self, other) Original Python 2 comparison operator. | source code
__eq__(self, other) Equals operator, implemented in terms of original Python 2 compare operator. | source code
__lt__(self, other) Less-than operator, implemented in terms of original Python 2 compare operator. | source code
__gt__(self, other) Greater-than operator, implemented in terms of original Python 2 compare operator. | source code
_setAbsolutePath(self, value) Property target used to set the absolute path. | source code
_getAbsolutePath(self) Property target used to get the absolute path. | source code
_setCollectMode(self, value) Property target used to set the collect mode. | source code
_getCollectMode(self) Property target used to get the collect mode. | source code
_setArchiveMode(self, value) Property target used to set the archive mode. | source code
_getArchiveMode(self) Property target used to get the archive mode. | source code
_setIgnoreFile(self, value) Property target used to set the ignore file. | source code
_getIgnoreFile(self) Property target used to get the ignore file. | source code
_setLinkDepth(self, value) Property target used to set the link depth. | source code
_getLinkDepth(self) Property target used to get the action linkDepth. | source code
_setDereference(self, value) Property target used to set the dereference flag. | source code
_getDereference(self) Property target used to get the dereference flag. | source code
_setRecursionLevel(self, value) Property target used to set the recursionLevel. | source code
_getRecursionLevel(self) Property target used to get the action recursionLevel. | source code
_setAbsoluteExcludePaths(self, value) Property target used to set the absolute exclude paths list. | source code
_getAbsoluteExcludePaths(self) Property target used to get the absolute exclude paths list. | source code
_setRelativeExcludePaths(self, value) Property target used to set the relative exclude paths list. | source code
_getRelativeExcludePaths(self) Property target used to get the relative exclude paths list. | source code
_setExcludePatterns(self, value) Property target used to set the exclude patterns list. | source code
_getExcludePatterns(self) Property target used to get the exclude patterns list. | source code
__ge__(x, y) x>=y |
__le__(x, y) x<=y |
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties | [hide private]
| absolutePath Absolute path of the directory to collect.
| collectMode Overridden collect mode for this directory.
| archiveMode Overridden archive mode for this directory.
| ignoreFile Overridden ignore file name for this directory.
| linkDepth Maximum at which soft links should be followed.
| dereference Whether to dereference links that are followed.
| absoluteExcludePaths List of absolute paths to exclude.
| relativeExcludePaths List of relative paths to exclude.
| excludePatterns List of regular expression patterns to exclude.
| recursionLevel Recursion level to use for recursive directory collection
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, absolutePath=None, collectMode=None, archiveMode=None, ignoreFile=None, absoluteExcludePaths=None, relativeExcludePaths=None, excludePatterns=None, linkDepth=None, dereference=False, recursionLevel=None) (Constructor) | source code
Constructor for the `CollectDir` class. Parameters: `absolutePath` - Absolute path of the directory to collect. `collectMode` - Overridden collect mode for this directory. `archiveMode` - Overridden archive mode for this directory. `ignoreFile` - Overidden ignore file name for this directory. `linkDepth` - Maximum at which soft links should be followed. `dereference` - Whether to dereference links that are followed. `absoluteExcludePaths` - List of absolute paths to exclude. `relativeExcludePaths` - List of relative paths to exclude. `excludePatterns` - List of regular expression patterns to exclude. Raises: `ValueError` - If one of the values is invalid. Overrides: object.__init__

### __repr__(self) (Representation operator) | source code
Official string representation for class instance. Overrides: object.__repr__

### __str__(self) (Informal representation operator) | source code
Informal string representation for class instance. Overrides: object.__str__

### __cmp__(self, other) (Comparison operator) | source code
Original Python 2 comparison operator. Lists within this class are "unordered" for equality comparisons. Parameters: `other` - Other object to compare to. Returns: -1/0/1 depending on whether self is `<`, `=` or `>` other.

### _setAbsolutePath(self, value) | source code
Property target used to set the absolute path. The value must be an absolute path if it is not `None`. It does not have to exist on disk at the time of assignment. Raises: `ValueError` - If the value is not an absolute path. `ValueError` - If the value cannot be encoded properly.

### _setCollectMode(self, value) | source code
Property target used to set the collect mode. If not `None`, the mode must be one of the values in VALID_COLLECT_MODES. Raises: `ValueError` - If the value is not valid.

### _setArchiveMode(self, value) | source code
Property target used to set the archive mode. If not `None`, the mode must be one of the values in VALID_ARCHIVE_MODES. Raises: `ValueError` - If the value is not valid.

### _setIgnoreFile(self, value) | source code
Property target used to set the ignore file. The value must be a non-empty string if it is not `None`. Raises: `ValueError` - If the value is an empty string.

### _setLinkDepth(self, value) | source code
Property target used to set the link depth. The value must be an integer >= 0. Raises: `ValueError` - If the value is not valid.

### _setDereference(self, value) | source code
Property target used to set the dereference flag. No validations, but we normalize the value to `True` or `False`.

### _setRecursionLevel(self, value) | source code
Property target used to set the recursionLevel. The value must be an integer. Raises: `ValueError` - If the value is not valid.

### _setAbsoluteExcludePaths(self, value) | source code
Property target used to set the absolute exclude paths list. Either the value must be `None` or each element must be an absolute path. Elements do not have to exist on disk at the time of assignment. Raises: `ValueError` - If the value is not an absolute path.

### _setRelativeExcludePaths(self, value) | source code
Property target used to set the relative exclude paths list. Elements do not have to exist on disk at the time of assignment.

Property Details | [hide private]

### absolutePath Absolute path of the directory to collect. Get Method: _getAbsolutePath(self) - Property target used to get the absolute path. Set Method: _setAbsolutePath(self, value) - Property target used to set the absolute path.

### collectMode Overridden collect mode for this directory. Get Method: _getCollectMode(self) - Property target used to get the collect mode. Set Method: _setCollectMode(self, value) - Property target used to set the collect mode.

### archiveMode Overridden archive mode for this directory. Get Method: _getArchiveMode(self) - Property target used to get the archive mode. Set Method: _setArchiveMode(self, value) - Property target used to set the archive mode.

### ignoreFile Overridden ignore file name for this directory. Get Method: _getIgnoreFile(self) - Property target used to get the ignore file. Set Method: _setIgnoreFile(self, value) - Property target used to set the ignore file.

### linkDepth Maximum at which soft links should be followed. Get Method: _getLinkDepth(self) - Property target used to get the action linkDepth. Set Method: _setLinkDepth(self, value) - Property target used to set the link depth.

### dereference Whether to dereference links that are followed. Get Method: _getDereference(self) - Property target used to get the dereference flag. Set Method: _setDereference(self, value) - Property target used to set the dereference flag.

### absoluteExcludePaths List of absolute paths to exclude. Get Method: _getAbsoluteExcludePaths(self) - Property target used to get the absolute exclude paths list. Set Method: _setAbsoluteExcludePaths(self, value) - Property target used to set the absolute exclude paths list.

### relativeExcludePaths List of relative paths to exclude. Get Method: _getRelativeExcludePaths(self) - Property target used to get the relative exclude paths list. Set Method: _setRelativeExcludePaths(self, value) - Property target used to set the relative exclude paths list.

### excludePatterns List of regular expression patterns to exclude. Get Method: _getExcludePatterns(self) - Property target used to get the exclude patterns list. Set Method: _setExcludePatterns(self, value) - Property target used to set the exclude patterns list.

### recursionLevel Recursion level to use for recursive directory collection Get Method: _getRecursionLevel(self) - Property target used to get the action recursionLevel. Set Method: _setRecursionLevel(self, value) - Property target used to set the recursionLevel.