forked from ungleich-public/cdist
new method which checks if object exists on the file system
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
96c059983a
commit
5a082058e5
1 changed files with 5 additions and 0 deletions
|
@ -97,3 +97,8 @@ class Object(object):
|
||||||
prepared = fsproperty.FileBooleanProperty(lambda obj: os.path.join(obj.absolute_path, "prepared"))
|
prepared = fsproperty.FileBooleanProperty(lambda obj: os.path.join(obj.absolute_path, "prepared"))
|
||||||
ran = fsproperty.FileBooleanProperty(lambda obj: os.path.join(obj.absolute_path, "ran"))
|
ran = fsproperty.FileBooleanProperty(lambda obj: os.path.join(obj.absolute_path, "ran"))
|
||||||
source = fsproperty.FileStringProperty(lambda obj: os.path.join(obj.absolute_path, "source"))
|
source = fsproperty.FileStringProperty(lambda obj: os.path.join(obj.absolute_path, "source"))
|
||||||
|
|
||||||
|
@property
|
||||||
|
def exists(self):
|
||||||
|
"""Checks wether this cdist object exists on the file systems."""
|
||||||
|
return os.path.exists(self.absolute_path)
|
||||||
|
|
Loading…
Reference in a new issue