parameters: (self,root)
docstring: Return a db object that will manage the specied directory
docstring_summary: Return a db object that will manage the specied directory
docstring_tokens: Return a db object that will manage the specied directory
function: def __init__(self,root):
          """ Return a db object that will manage the specied directory"""
          if not isinstance(root, string_types):
              root = str(root)
          root = os.path.abspath(os.path.expanduser(root))
          self.root = Path(root)
          if not self.root.is_dir():
              # catching the exception is necessary if multiple processes are concurrently trying to create a folder
              # exists_ok keyword argument of mkdir does the same but only from Python 3.5
              try:
                  self.root.mkdir(parents=True)
              except OSError as e:
                  if e.errno != errno.EEXIST:
                      raise
          # cache has { 'key' : (obj, orig_mod_time) }
          self.cache = {}
function_tokens: def __init__ ( self , root ) : if not isinstance ( root , string_types ) : root = str ( root ) root = os . path . abspath ( os . path . expanduser ( root ) ) self . root = Path ( root ) if not self . root . is_dir ( ) : # catching the exception is necessary if multiple processes are concurrently trying to create a folder # exists_ok keyword argument of mkdir does the same but only from Python 3.5 try : self . root . mkdir ( parents = True ) except OSError as e : if e . errno != errno . EEXIST : raise # cache has { 'key' : (obj, orig_mod_time) } self . cache = { }