@acquire_lock<EOL><INDENT>@sync_required<EOL>def update_file(self, value, relativePath, name=None,<EOL>description=False, klass=False,<EOL>dump=False, pull=False,<EOL>ACID=None, verbose=False):<DEDENT>
<EOL>if ACID is None:<EOL><INDENT>ACID = self.__ACID<EOL><DEDENT>assert isinstance(ACID, bool), "<STR_LIT>"<EOL>relativePath = os.path.normpath(relativePath)<EOL>if relativePath == '<STR_LIT:.>':<EOL><INDENT>relativePath = '<STR_LIT>'<EOL>assert name != '<STR_LIT>', "<STR_LIT>"<EOL>assert name != '<STR_LIT>', "<STR_LIT>"<EOL>assert name != '<STR_LIT>', "<STR_LIT>"<EOL><DEDENT>if name is None:<EOL><INDENT>assert len(relativePath), "<STR_LIT>"<EOL>relativePath,name = os.path.split(relativePath)<EOL><DEDENT>fileInfoDict, errorMessage = self.get_file_info(relativePath, name)<EOL>assert fileInfoDict is not None, errorMessage<EOL>realPath = os.path.join(self.__path, relativePath)<EOL>if verbose:<EOL><INDENT>if not os.path.isfile( os.path.join(realPath, name) ):<EOL><INDENT>warnings.warn("<STR_LIT>"%os.path.join(realPath, name))<EOL><DEDENT><DEDENT>if not dump:<EOL><INDENT>dump = fileInfoDict["<STR_LIT>"]<EOL><DEDENT>if not pull:<EOL><INDENT>pull = fileInfoDict["<STR_LIT>"]<EOL><DEDENT>if ACID:<EOL><INDENT>savePath = os.path.join(tempfile.gettempdir(), name)<EOL><DEDENT>else:<EOL><INDENT>savePath = os.path.join(realPath,name)<EOL><DEDENT>try:<EOL><INDENT>exec( dump.replace("<STR_LIT>", str(savePath)) )<EOL><DEDENT>except Exception as e:<EOL><INDENT>message = "<STR_LIT>"%e<EOL>if '<STR_LIT>' in dump:<EOL><INDENT>message += '<STR_LIT>'%str(get_pickling_errors(value))<EOL><DEDENT>raise Exception( message )<EOL><DEDENT>if ACID:<EOL><INDENT>try:<EOL><INDENT>shutil.copyfile(savePath, os.path.join(realPath,name))<EOL><DEDENT>except Exception as e:<EOL><INDENT>os.remove(savePath)<EOL>if verbose:<EOL><INDENT>warnings.warn(e)<EOL><DEDENT>return<EOL><DEDENT>os.remove(savePath)<EOL><DEDENT>fileInfoDict["<STR_LIT>"] = datetime.utcnow()<EOL>if description is not False:<EOL><INDENT>fileInfoDict["<STR_LIT:description>"] = description<EOL><DEDENT>if klass is not False:<EOL><INDENT>assert inspect.isclass(klass), "<STR_LIT>"<EOL>fileInfoDict["<STR_LIT:class>"] = klass<EOL><DEDENT>self.save()<EOL>
Update the value and the utc timestamp of a file that is already in the Repository.\n
If file is not registered in repository, and error will be thrown.\n
If file is missing in the system, it will be regenerated as dump method is called.

:Parameters:
    #. value (object): The value of the file to update. It is any python object or a file.
    #. relativePath (str): The relative to the repository path of the directory where the file should be dumped.
    #. name (None, string): The file name.
       If None is given, name will be split from relativePath.
    #. description (False, string, pickable object): Any random description about the file.
       If False is given, the description info won't be updated,
       otherwise it will be update to what description argument value is.
    #. klass (False, class): The dumped object class. If False is given,
       the class info won't be updated, otherwise it will be update to what klass argument value is.
    #. dump (False, string): The new dump method. If False is given, the old one will be used.
    #. pull (False, string): The new pull method. If False is given, the old one will be used.
    #. ACID (boolean): Whether to ensure the ACID (Atomicity, Consistency, Isolation, Durability)
       properties of the repository upon dumping a file. This is ensured by dumping the file in
       a temporary path first and then moving it to the desired path.
       If None is given, repository ACID property will be used.
    #. verbose (boolean): Whether to be warn and informed about any abnormalities.