summaryrefslogtreecommitdiff
path: root/obnam
diff options
context:
space:
mode:
authorLars Wirzenius <liw@gytha>2008-04-13 21:49:48 +0300
committerLars Wirzenius <liw@gytha>2008-04-13 21:49:48 +0300
commitc71013e0d6578522fa8a57acad183458f62d8701 (patch)
tree6c684604a9cc6ec5e427f1db86f87962f217eb01 /obnam
parent30d6ca31f85650681ea262a3fea5301c53c23b51 (diff)
downloadobnam-c71013e0d6578522fa8a57acad183458f62d8701.tar.gz
Started implementation of Store.lookup_file.
Diffstat (limited to 'obnam')
-rw-r--r--obnam/store.py10
-rw-r--r--obnam/storeTests.py4
2 files changed, 14 insertions, 0 deletions
diff --git a/obnam/store.py b/obnam/store.py
index abd2cc65..73e0458b 100644
--- a/obnam/store.py
+++ b/obnam/store.py
@@ -205,3 +205,13 @@ class Store:
parts = self.parse_pathname(pathname)
return self._lookup_dir_from_refs(generation.get_dirrefs(), parts)
+
+ def lookup_file(self, generation, pathname):
+ """Find a non-directory thingy in a generation.
+
+ Return a FILE component that corresponds to the filesystem entity
+ in question. If not found, return None.
+
+ """
+
+ return None
diff --git a/obnam/storeTests.py b/obnam/storeTests.py
index 196547c4..2e3334a3 100644
--- a/obnam/storeTests.py
+++ b/obnam/storeTests.py
@@ -271,3 +271,7 @@ class StoreLookupTests(unittest.TestCase):
def testDoesNotFindNonExistentDir(self):
self.failUnlessEqual(self.store.lookup_dir(self.gen, "notexist"),
None)
+
+ def testDoesNotFindNonExistentFile(self):
+ self.failUnlessEqual(self.store.lookup_file(self.gen, "notexist"),
+ None)