Example #1
0
    def get_fs_meta_struct(self, fs_meta_path):
        fs_meta_struct = {}

        if os.path.isfile(fs_meta_path):
            with open(fs_meta_path) as meta_file:
                fs_meta_struct = json.loads(
                    compress.one_shot_decompress(self.compression_algo,
                                                 meta_file.read()))

        return fs_meta_struct
Example #2
0
    def get_fs_meta_struct(self, fs_meta_path):
        fs_meta_struct = {}

        if os.path.isfile(fs_meta_path):
            with open(fs_meta_path) as meta_file:
                fs_meta_struct = json.loads(
                    compress.one_shot_decompress(self.compression_algo,
                                                 meta_file.read()))

        return fs_meta_struct
Example #3
0
    def get_fs_meta_struct(self, fs_meta_path):
        old_files_meta = {}

        if os.path.isfile(fs_meta_path):
            with open(fs_meta_path) as meta_file:
                old_files_meta = msgpack.loads(compress.one_shot_decompress(
                    self.compression_algo, meta_file.read()))

        old_fs_meta_struct = old_files_meta.get('files', {})
        rsync_bs = old_files_meta.get('rsync_block_size')

        return old_fs_meta_struct, rsync_bs
Example #4
0
    def get_fs_meta_struct(self, fs_meta_path):
        old_files_meta = {}

        if os.path.isfile(fs_meta_path):
            with open(fs_meta_path) as meta_file:
                old_files_meta = msgpack.loads(
                    compress.one_shot_decompress(self.compression_algo,
                                                 meta_file.read()))

        old_fs_meta_struct = old_files_meta.get('files', {})
        rsync_bs = old_files_meta.get('rsync_block_size')

        return old_fs_meta_struct, rsync_bs