获取文件的metaData

@return
550372
public Map<String, Object> getFileMetaData() {
    if (file == null) {
      file = new HashMap<String, Object>();
    }
    Map<String, Object> meta;
    if (!file.containsKey(FILE_META)) {
      meta = new HashMap<String, Object>();
      meta.put(FILE_SIZE, actualFile.getSize());
    } else {
      meta = (Map<String, Object>) file.get(FILE_META);
    }
    return meta;
  }
189498
public synchronized File getLogFile() {

        File dir = getStorageDir();
        if (dir == null) {
            Log.e(TAG, "Unable to open log file from external storage");
            return null;
        }

        switch (wraper.nameFormat) {
            case WrapFormatter.NAME_FORMAT_DATE: {
                String file = getFormattedNameWithDate(dir);
                mLogFile = new File(dir, file);
            }
            break;
            case WrapFormatter.NAME_FORMAT_PLUSINDEX: {
                String file = getFormattedNameWithPlusIndex(dir);
                mLogFile = new File(dir, file);
            }
            break;
            case WrapFormatter.NAME_FORMAT_NONE: {
                mLogFile = new File(dir, getFileName(fileName).concat(DEFUALT_FILE_EXT));
            }
            break;
            default: {
                mLogFile = new File(dir, getFileName(fileName).concat(DEFUALT_FILE_EXT));
            }
            break;
        }

        try {
            mLogFile.getParentFile().mkdirs();
            mLogFile.createNewFile();
        } catch (IOException e) {
            Log.e(TAG, "创建文件失败了..." + e.toString() + " mLogFile.getParentFile()");
        }

        return mLogFile;
    }
77114
def metadata(self):
        
        if self._metadata is None:
            try:
                with open(self.paths.metadata()) as metadata_fd:
                    self._metadata = json.load(metadata_fd)
            except IOError:
                self._metadata = {}
        return self._metadata
24010
public function getMetadata()
    {
        try {
            $path = $this->getPrefix();
            if ($this->getFileSystem()->has($path)) {
                return $this->getFileSystem()->get($path)->getMetadata();
            }

        } catch (FileNotFoundException $e) {
        }
        return false;
    }
641681
public CmsFile getFile() {

        if ((m_file == null) && !isFolder()) {
            try {
                m_file = m_cms.readFile(this);
            } catch (CmsException e) {
                // this should not happen since we are updating from a resource object
            }
        }
        return m_file;
    }
526751
@java.lang.Deprecated
  public java.util.Map<java.lang.String, com.google.appengine.v1.FileInfo> getFiles() {
    return getFilesMap();
  }
514406
public Metadata[] readMetadata() throws IOException {
        readStreamSync();
        ArrayList<Metadata> metadataList = new ArrayList<Metadata>();
        Metadata metadata;
        do {
            metadata = readNextMetadata();
            metadataList.add(metadata);
        } while (!metadata.isLast());
        return (Metadata[])metadataList.toArray(new Metadata[0]);
    }
167731
protected Format getFormat(Map<String,String> metaInfo) {
        Format format = Format.json;
        metaInfo.put(Listener.METAINFO_CONTENT_TYPE, Listener.CONTENT_TYPE_JSON);
        String formatParam = (String) metaInfo.get("format");
        if (formatParam != null) {
            if (formatParam.equals("xml")) {
                format = Format.xml;
                metaInfo.put(Listener.METAINFO_CONTENT_TYPE, Listener.CONTENT_TYPE_XML);
            }
            else if (formatParam.equals("text")) {
                format = Format.text;
                metaInfo.put(Listener.METAINFO_CONTENT_TYPE, Listener.CONTENT_TYPE_TEXT);
            }
        }
        else {
            if (Listener.CONTENT_TYPE_XML.equals(metaInfo.get(Listener.METAINFO_CONTENT_TYPE)) || Listener.CONTENT_TYPE_XML.equals(metaInfo.get(Listener.METAINFO_CONTENT_TYPE.toLowerCase()))) {
                format = Format.xml;
                metaInfo.put(Listener.METAINFO_CONTENT_TYPE, Listener.CONTENT_TYPE_XML);
            }
            else if (Listener.CONTENT_TYPE_TEXT.equals(metaInfo.get(Listener.METAINFO_CONTENT_TYPE)) || Listener.CONTENT_TYPE_TEXT.equals(metaInfo.get(Listener.METAINFO_CONTENT_TYPE.toLowerCase()))) {
                format = Format.text;
                metaInfo.put(Listener.METAINFO_CONTENT_TYPE, Listener.CONTENT_TYPE_JSON);
            }
        }
        return format;
    }
917529
private String getContenFileName() {
        final String file  = this.content.getPath();
        if(file.indexOf('/') != -1){
            return file.substring(file.lastIndexOf('/'));
        }
        return file;
    }
1066814
public ManagedConnectionMetaData getMetaData() {

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, "getMetaData");
        }

        if (_metaData == null) {

            _metaData = new SibRaMetaData();
        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, "getMetaData", _metaData);
        }
        return _metaData;

    }
202584
public String getContent() {

        if ((m_content.length() == 0) && (getFile() != null)) {
            m_content = new String(getFile().getContents());
        }
        return m_content;
    }
1096197
@SuppressWarnings("unchecked")
    public HashMap<String, HashMap<String, String>> getMetaData() {
        HashMap<String, HashMap<String, String>> result = new HashMap<String, HashMap<String, String>>();
        for (MetaRecord mr : meta) {
            result.put((String) mr.get(FieldName.META_FILENAME),
                    (HashMap<String, String>) mr.get(FieldName.META_PROPERTIES));
        }
        return result;
    }
560889
public Map<String, Object> toMap() {
        Map<String, Object> ret = new HashMap<>();
        ret.put(MetricUploader.METRIC_TIME, timestamp);
        ret.put(MetricUploader.METRIC_TYPE, type);
        
        return ret;
    }
142654
public function getMetadata(): array
    {
        if ($this->metadata === null) {
            $this->metadata = $this->readMetadata();

            ksort($this->metadata);
        }

        return $this->metadata;
    }
984955
private Map<String, String> defaultMetadata() {

    final Builder<String, String> builder = ImmutableMap.builder();

    final Map<String, String> envVars = envVarSupplier.get();

    for (final Map.Entry<String, String> entry : DEFAULT_METADATA_ENVVARS.entrySet()) {
      final String envKey = entry.getKey();
      final String metadataKey = entry.getValue();

      final String envValue = envVars.get(envKey);
      if (envValue != null) {
        builder.put(metadataKey, envValue);
      }
    }

    return builder.build();
  }
1283488
public Map<String, Object> getRawMetadata() {
        Map<String,Object> copy = new TreeMap<String,Object>(String.CASE_INSENSITIVE_ORDER);
        copy.putAll(metadata);
        return Collections.unmodifiableMap(copy);
    }
405870
def _parse_metadata_filename(self, metadata):
        
        index = metadata['Content-Disposition'].index('=')+1
        metadata['filename'] = metadata['Content-Disposition'][index:].replace('"', '')
        return metadata