##// END OF EJS Templates
store: add a contains method to basicstore...
smuralid -
r17744:09d5b205 default
parent child Browse files
Show More
@@ -341,6 +341,17 b' class basicstore(object):'
341 341 def write(self):
342 342 pass
343 343
344 def __contains__(self, path):
345 '''Checks if the store contains path'''
346 path = "/".join(("data", path))
347 # file?
348 if os.path.exists(self.join(path + ".i")):
349 return True
350 # dir?
351 if not path.endswith("/"):
352 path = path + "/"
353 return os.path.exists(self.join(path))
354
344 355 class encodedstore(basicstore):
345 356 def __init__(self, path, vfstype):
346 357 vfs = vfstype(path + '/store')
General Comments 0
You need to be logged in to leave comments. Login now