コード例 #1
0
static PassOwnPtr<BlobData> createBlobDataForFileWithMetadata(const String& fileSystemName, const FileMetadata& metadata)
{
    OwnPtr<BlobData> blobData = BlobData::create();
    blobData->setContentType(getContentTypeFromFileName(fileSystemName, File::WellKnownContentTypes));
    blobData->appendFile(metadata.platformPath, 0, metadata.length, metadata.modificationTime);
    return blobData.release();
}
コード例 #2
0
static PassOwnPtr<BlobData> createBlobDataForFileSystemURL(const KURL& fileSystemURL, const FileMetadata& metadata)
{
    OwnPtr<BlobData> blobData = BlobData::create();
    blobData->setContentType(getContentTypeFromFileName(fileSystemURL.path(), File::WellKnownContentTypes));
    blobData->appendURL(fileSystemURL, 0, metadata.length, metadata.modificationTime);
    return blobData.release();
}
コード例 #3
0
static std::unique_ptr<BlobData> createBlobDataForFileWithName(
    const String& path,
    const String& fileSystemName,
    File::ContentTypeLookupPolicy policy) {
  return createBlobDataForFileWithType(
      path, getContentTypeFromFileName(fileSystemName, policy));
}
コード例 #4
0
static std::unique_ptr<BlobData> createBlobDataForFileSystemURL(
    const KURL& fileSystemURL,
    const FileMetadata& metadata) {
  std::unique_ptr<BlobData> blobData = BlobData::create();
  blobData->setContentType(getContentTypeFromFileName(
      fileSystemURL.path(), File::WellKnownContentTypes));
  blobData->appendFileSystemURL(fileSystemURL, 0, metadata.length,
                                metadata.modificationTime / msPerSecond);
  return blobData;
}
コード例 #5
0
static std::unique_ptr<BlobData> createBlobDataForFileWithMetadata(
    const String& fileSystemName,
    const FileMetadata& metadata) {
  std::unique_ptr<BlobData> blobData = BlobData::create();
  blobData->setContentType(
      getContentTypeFromFileName(fileSystemName, File::WellKnownContentTypes));
  blobData->appendFile(metadata.platformPath, 0, metadata.length,
                       metadata.modificationTime / msPerSecond);
  return blobData;
}
コード例 #6
0
static PassOwnPtr<BlobData> createBlobDataForFile(const String& path, File::ContentTypeLookupPolicy policy)
{
    return createBlobDataForFileWithType(path, getContentTypeFromFileName(path, policy));
}
コード例 #7
0
ファイル: File.cpp プロジェクト: Spencerx/webkit
static PassOwnPtr<BlobData> createBlobDataForFileWithName(const String& path, const String& fileSystemName)
{
    return createBlobDataForFileWithType(path, getContentTypeFromFileName(fileSystemName));
}