bversion/storage/client_filesystem_interface.py
def fs_put(self, rpath, data, additional_manifest_data = None):
        """ Add a file to the FS """

        if additional_manifest_data is None:
            additional_manifest_data = {}

        try:
            self.jfs.begin()

            # Add the file to the fs
            tmppath = cpjoin('.bvn', 'downloading')
            self.jfs.file_put_contents(tmppath, data)
            self.jfs.move_file(tmppath, rpath)

            # Add to the manifest
            file_info = self.get_single_file_info(rpath)
            file_info.update(additional_manifest_data)
            self.client_db.add_file_to_manifest(file_info)

            self.jfs.commit()
        except:
            self.jfs.rollback(); raise
 Add a file to the FS 
Add a file to the FS
Add a file to the FS
def fs_put(self, rpath, data, additional_manifest_data = None):
        if additional_manifest_data is None:
            additional_manifest_data = {}
        try:
            self.jfs.begin()
            tmppath = cpjoin('.bvn', 'downloading')
            self.jfs.file_put_contents(tmppath, data)
            self.jfs.move_file(tmppath, rpath)
            file_info = self.get_single_file_info(rpath)
            file_info.update(additional_manifest_data)
            self.client_db.add_file_to_manifest(file_info)
            self.jfs.commit()
        except:
            self.jfs.rollback(); raise
def fs_put ( self , rpath , data , additional_manifest_data = None ) : if additional_manifest_data is None : additional_manifest_data = { } try : self . jfs . begin ( ) tmppath = cpjoin ( '.bvn' , 'downloading' ) self . jfs . file_put_contents ( tmppath , data ) self . jfs . move_file ( tmppath , rpath ) file_info = self . get_single_file_info ( rpath ) file_info . update ( additional_manifest_data ) self . client_db . add_file_to_manifest ( file_info ) self . jfs . commit ( ) except : self . jfs . rollback ( ) ; raise
Add a file to the FS
Add a file to the FS
""" Add a file to the FS """ # Add the file to the fs # Add to the manifest
self
rpath
data
additional_manifest_data