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(); }
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(); }
static std::unique_ptr<BlobData> createBlobDataForFileWithName( const String& path, const String& fileSystemName, File::ContentTypeLookupPolicy policy) { return createBlobDataForFileWithType( path, getContentTypeFromFileName(fileSystemName, policy)); }
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; }
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; }
static PassOwnPtr<BlobData> createBlobDataForFile(const String& path, File::ContentTypeLookupPolicy policy) { return createBlobDataForFileWithType(path, getContentTypeFromFileName(path, policy)); }
static PassOwnPtr<BlobData> createBlobDataForFileWithName(const String& path, const String& fileSystemName) { return createBlobDataForFileWithType(path, getContentTypeFromFileName(fileSystemName)); }