Updates metadata of file and deletes old meta file from legacy mode.
764949
def update_metadata(uid)
      return false unless store_meta
      path = full_path(uid)
      meta = storage(:get_blob, container_name, path)[0].metadata
      return false if meta.present?
      meta = meta_from_file(path)
      return false if meta.blank?
      storage(:set_blob_metadata, container_name, path, meta)
      storage(:delete_blob, container_name, meta_path(path))
      true
    rescue Azure::Core::Http::HTTPError
      nil
    end
279705
def copy_metadata(src_path, dest_path, **options)
      stats = ::File.lstat(src_path)
      ::File.utime(stats.atime, stats.mtime, dest_path)
      chmod(dest_path, stats.mode, options)
    end
221499
private void updateMetadata(SegmentProperties segmentProperties) {
        this.metadata.setStorageLength(segmentProperties.getLength());
        if (segmentProperties.isSealed() && !this.metadata.isSealedInStorage()) {
            this.metadata.markSealed();
            this.metadata.markSealedInStorage();
        }
    }
1182775
def store_meta(self,meta):
        ""
        if self.meta is None:
            self.meta = {}
        self.meta.update(meta)
        return self
1053537
def _patch_distribution_metadata():
    """"""
    for attr in ('write_pkg_file', 'read_pkg_file', 'get_metadata_version'):
        new_val = getattr(setuptools.dist, attr)
        setattr(distutils.dist.DistributionMetadata, attr, new_val)
1233585
function processFile(file, filename, callback) {
      // Check if it matches the convention.
      if (path.extname(filename) === '.metadata') {
        // Find the name of the metadata.
        const name = path.basename(filename, '.metadata')

        // Recursively merge the meta data.
        const newMetadata = {}
        newMetadata[name] = file
        extend(true, metadata, newMetadata)

        // Remove the file since we've now processed it.
        delete files[filename]
      }

      callback()
    }
1271211
function remove(path, fn, callback) {
        var meta = {};
        resolvePath(path, function (err, realpath) {
            if (err) return callback(err);
            fn(realpath, function (err) {
                if (err) return callback(err);
                
                // Remove metadata
                resolvePath(WSMETAPATH + path, function (err, realpath) {
                    if (err) return callback(null, meta);
                    
                    fn(realpath, function(){
                        return callback(null, meta);
                    });
                });
            });
        });
    }
154570
def delete_metadata(self, href=None):
        """"""

        # Argument error checking.
        assert href is not None

        raw_result = self.delete(href)

        if raw_result.status != 204:
            raise APIException(raw_result.status, raw_result.json)
245040
def _flush(self):
        
        with open(self.metadata_file, 'w') as f:
            json.dump(self.metadata, f)
471519
def update_last_backup_meta_data(self):
        """"""
        self.meta['last_backup']['time'] = get_time_string_for_float(self.last_backup_time)
        self.meta['last_backup']['file_system_path'] = self._tmp_storage_path
        self.meta['last_backup']['marked_dirty'] = self.state_machine_model.state_machine.marked_dirty
225483
function forcePublicMetadata(metadata) {
        delete metadata.isProtected;
        delete metadata.isPrivate;
        metadata.isPublic = metadata.forcedPublic = true;
    }
120352
def update_readme(self, template_readme: Template):
        """"""
        readme = os.path.join(self.cached_repo, "README.md")
        if os.path.exists(readme):
            os.remove(readme)
        links = {model_type: {} for model_type in self.models.keys()}
        for model_type, model_uuids in self.models.items():
            for model_uuid in model_uuids:
                links[model_type][model_uuid] = os.path.join("/", model_type, "%s.md" % model_uuid)
        with open(readme, "w") as fout:
            fout.write(template_readme.render(models=self.models, meta=self.meta, links=links))
        git.add(self.cached_repo, [readme])
        self._log.info("Updated %s", readme)
671060
def clean_meta(rst_content):
    """"""

    rst = rst_content.split('\n')
    for i, line in enumerate(rst):
        if line.startswith('#'):
            continue
        break
    return '\n'.join(rst[i:])
334715
def update_metadata(session, path=DATA_PATH):
    """"""
    with open(os.path.join(path, 'games.json')) as handle:
        games = json.loads(handle.read())
     
    for key, data in get_metadata(session, games).items():
        with open(os.path.join(path, '{}.json'.format(key)), 'w') as handle:
           handle.write(json.dumps(data, indent=2))
1008858
private static String convertMetatadataFileName(String oldFileName) {
    Matcher matcher = PRE_GENSTAMP_META_FILE_PATTERN.matcher(oldFileName);
    if (matcher.matches()) {
      //return the current metadata file name
      return BlockWithChecksumFileWriter.getMetaFileName(matcher.group(1),
                                       Block.GRANDFATHER_GENERATION_STAMP);
    }
    return oldFileName;
  }
1257907
def remove_file(self, name):
        """"""
        assert compat.is_native(name)
        self.check_write(name)
        # self.cur_dir_meta.remove(name)
        self.ftp.delete(name)
        self.remove_sync_info(name)
790324
function clearMeta()
    {
        $content = array();
        eZFile::create( $this->MetaFileName, false, serialize( $content), true );
    }