mercurial/scmutil.py
changeset 17161 be016e96117a
parent 17157 87e8440964a0
child 17201 afd75476939e
equal deleted inserted replaced
17160:22b9b1d2f5d4 17161:be016e96117a
   187         fp = self(path, 'ab')
   187         fp = self(path, 'ab')
   188         try:
   188         try:
   189             return fp.write(data)
   189             return fp.write(data)
   190         finally:
   190         finally:
   191             fp.close()
   191             fp.close()
       
   192 
       
   193     def mkdir(self, path=None):
       
   194         return os.mkdir(self.join(path))
       
   195 
       
   196     def exists(self, path=None):
       
   197         return os.path.exists(self.join(path))
       
   198 
       
   199     def isdir(self, path=None):
       
   200         return os.path.isdir(self.join(path))
       
   201 
       
   202     def makedir(self, path=None, notindexed=True):
       
   203         return util.makedir(self.join(path), notindexed)
       
   204 
       
   205     def makedirs(self, path=None, mode=None):
       
   206         return util.makedirs(self.join(path), mode)
   192 
   207 
   193 class opener(abstractopener):
   208 class opener(abstractopener):
   194     '''Open files relative to a base directory
   209     '''Open files relative to a base directory
   195 
   210 
   196     This class is used to hide the details of COW semantics and
   211     This class is used to hide the details of COW semantics and
   291 
   306 
   292     def audit(self, path):
   307     def audit(self, path):
   293         self.auditor(path)
   308         self.auditor(path)
   294 
   309 
   295     def join(self, path):
   310     def join(self, path):
   296         return os.path.join(self.base, path)
   311         if path:
       
   312             return os.path.join(self.base, path)
       
   313         else:
       
   314             return self.base
   297 
   315 
   298 class filteropener(abstractopener):
   316 class filteropener(abstractopener):
   299     '''Wrapper opener for filtering filenames with a function.'''
   317     '''Wrapper opener for filtering filenames with a function.'''
   300 
   318 
   301     def __init__(self, opener, filter):
   319     def __init__(self, opener, filter):