summaryrefslogtreecommitdiff
path: root/src/buildstream/storage/directory.py
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2020-03-03 17:18:11 +0100
committerJürg Billeter <j@bitron.ch>2020-03-10 15:46:04 +0000
commit7fbfccce44247122c5b9257e73328de16afa0445 (patch)
tree44e14a6c3e68e286905e1df825d5e856b58eac46 /src/buildstream/storage/directory.py
parentf78e6ee55e98c91e2cef055e232df5b955ac7323 (diff)
downloadbuildstream-7fbfccce44247122c5b9257e73328de16afa0445.tar.gz
storage: Add public Directory.exists() method
Diffstat (limited to 'src/buildstream/storage/directory.py')
-rw-r--r--src/buildstream/storage/directory.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/buildstream/storage/directory.py b/src/buildstream/storage/directory.py
index 55cc717f2..a9249baee 100644
--- a/src/buildstream/storage/directory.py
+++ b/src/buildstream/storage/directory.py
@@ -196,6 +196,18 @@ class Directory:
and effective space used may be lower than this number due to deduplication. """
raise NotImplementedError()
+ def exists(self, *paths: str, follow_symlinks: bool = False) -> bool:
+ """ Check whether the specified path exists.
+
+ Args:
+ *paths: A list of strings which are all path components.
+ follow_symlinks: True to follow symlinks.
+
+ Returns:
+ True if the path exists, False otherwise.
+ """
+ raise NotImplementedError()
+
# FileType:
#