@acquire_lock<EOL><INDENT>@sync_required<EOL>def add_directory(self, relativePath, info=None):<DEDENT>
path = os.path.normpath(relativePath)<EOL>currentDir  = self.path<EOL>currentDict = self<EOL>if path in ("<STR_LIT>","<STR_LIT:.>"):<EOL><INDENT>return currentDict<EOL><DEDENT>save = False<EOL>for dir in path.split(os.sep):<EOL><INDENT>dirPath = os.path.join(currentDir, dir)<EOL>if not os.path.exists(dirPath):<EOL><INDENT>os.mkdir(dirPath)<EOL><DEDENT>currentDict = dict.__getitem__(currentDict, "<STR_LIT>")<EOL>if currentDict.get(dir, None) is None:<EOL><INDENT>save = True<EOL>currentDict[dir] = {"<STR_LIT>":{}, "<STR_LIT>":{},<EOL>"<STR_LIT>":datetime.utcnow(),<EOL>"<STR_LIT:id>":str(uuid.uuid1()),<EOL>"<STR_LIT:info>": info} <EOL><DEDENT>currentDict = currentDict[dir]<EOL>currentDir  = dirPath<EOL><DEDENT>if save:<EOL><INDENT>self.save()<EOL><DEDENT>return currentDict<EOL>
Adds a directory in the repository and creates its
attribute in the Repository with utc timestamp.
It insures adding all the missing directories in the path.

:Parameters:
    #. relativePath (string): The relative to the repository path of the directory to add in the repository.
    #. info (None, string, pickable object): Any random info about the folder.

:Returns:
    #. info (dict): The directory info dict.