FileContentStorage
Class: FileContentStorage
Defined in: packages/utils/src/content.ts:405
Local filesystem ContentStorage implementation
Implements
Constructors
Constructor
new FileContentStorage():
FileContentStorage
Returns
FileContentStorage
Properties
schemes
readonlyschemes:string[]
Defined in: packages/utils/src/content.ts:406
Schemes handled, without ':' e.g. ["s3"], ["gs", "gcs"], ["file"]
Implementation of
Methods
deleteContent()
deleteContent(
url):Promise<void>
Defined in: packages/utils/src/content.ts:510
Delete file
Parameters
url
string
file URL or path
Returns
Promise<void>
Implementation of
getContent()
getContent(
url,options?):Promise<Readable>
Defined in: packages/utils/src/content.ts:414
Get content read stream
Parameters
url
string
file URL or path
options?
range options
Returns
Promise<Readable>
Readable stream
Implementation of
getWriteStream()
getWriteStream(
url):Promise<Writable>
Defined in: packages/utils/src/content.ts:434
Get a write stream to the target path, creating parent directories if needed
Parameters
url
string
file URL or path
Returns
Promise<Writable>
Writable stream
headContent()
headContent(
url):Promise<ContentInfo|undefined>
Defined in: packages/utils/src/content.ts:491
Head content metadata
Parameters
url
string
file URL or path
Returns
Promise<ContentInfo | undefined>
ContentInfo or undefined if not found
Implementation of
putContent()
putContent(
url,body,options?):Promise<ContentInfo>
Defined in: packages/utils/src/content.ts:448
Put content atomically via temporary file and rename
Parameters
url
string
file URL or path
body
content to write
options?
write options
Returns
Promise<ContentInfo>
written ContentInfo