##// END OF EJS Templates
store: add new _exists helper function on fncachestore
Adrian Buehlmann -
r17783:df55ce68 default
parent child Browse files
Show More
@@ -512,6 +512,17 b' class fncachestore(basicstore):'
512 def write(self):
512 def write(self):
513 self.fncache.write()
513 self.fncache.write()
514
514
515 def _exists(self, f):
516 ef = self.encode(f)
517 try:
518 self.getsize(ef)
519 return True
520 except OSError, err:
521 if err.errno != errno.ENOENT:
522 raise
523 # nonexistent entry
524 return False
525
515 def __contains__(self, path):
526 def __contains__(self, path):
516 '''Checks if the store contains path'''
527 '''Checks if the store contains path'''
517 path = "/".join(("data", path))
528 path = "/".join(("data", path))
General Comments 0
You need to be logged in to leave comments. Login now