@acquire_lock<EOL><INDENT>@sync_required<EOL>def move_directory(self, relativePath, relativeDestination, replace=False, verbose=True):<DEDENT>
<EOL>relativePath    = os.path.normpath(relativePath)<EOL>relativeDestination = os.path.normpath(relativeDestination)<EOL>filesInfo = list( self.walk_files_info(relativePath=relativePath) )<EOL>dirsPath  = list( self.walk_directories_relative_path(relativePath=relativePath) )<EOL>dirInfoDict, errorMessage = self.get_directory_info(relativePath)<EOL>assert dirInfoDict is not None, errorMessage<EOL>self.remove_directory(relativePath=relativePath, removeFromSystem=False)<EOL>self.add_directory(relativeDestination)<EOL>for RP, info in filesInfo:<EOL><INDENT>source      = os.path.join(self.__path, relativePath, RP)<EOL>destination = os.path.join(self.__path, relativeDestination, RP)<EOL>newDirRP, fileName = os.path.split(os.path.join(relativeDestination, RP))<EOL>dirInfoDict = self.add_directory( newDirRP )<EOL>if os.path.isfile(destination):<EOL><INDENT>if replace:<EOL><INDENT>os.remove(destination)<EOL>if verbose:<EOL><INDENT>warnings.warn("<STR_LIT>"%(fileName, newDirRP))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if verbose:<EOL><INDENT>warnings.warn("<STR_LIT>"%(fileName,destination))<EOL><DEDENT>continue<EOL><DEDENT><DEDENT>os.rename(source, destination)<EOL>dict.__getitem__(dirInfoDict, "<STR_LIT>")[fileName] = info<EOL><DEDENT>self.save()<EOL>
Move a directory in the repository from one place to another. It insures moving all the
files and subdirectories in the system.

:Parameters:
    #. relativePath (string): The relative to the repository path of the directory to be moved.
    #. relativeDestination (string): The new relative to the repository path of the directory.
    #. replace (boolean): Whether to replace existing files with the same name in the new created directory.
    #. verbose (boolean): Whether to be warn and informed about any abnormalities.