MemoryContentStorage
Class: MemoryContentStorage
Defined in: packages/utils/src/content.ts:524
In-memory ContentStorage implementation (useful for tests)
Implements
Constructors
Constructor
new MemoryContentStorage():
MemoryContentStorage
Returns
MemoryContentStorage
Properties
schemes
readonlyschemes:string[]
Defined in: packages/utils/src/content.ts:525
Schemes handled, without ':' e.g. ["s3"], ["gs", "gcs"], ["file"]
Implementation of
Methods
clear()
clear():
void
Defined in: packages/utils/src/content.ts:637
Clear all stored items
Returns
void
deleteContent()
deleteContent(
url):Promise<void>
Defined in: packages/utils/src/content.ts:629
Delete content
Parameters
url
string
memory URL
Returns
Promise<void>
Implementation of
getContent()
getContent(
url,options?):Promise<Readable>
Defined in: packages/utils/src/content.ts:554
Get content from memory
Parameters
url
string
memory URL
options?
range options
Returns
Promise<Readable>
Readable stream
Implementation of
headContent()
headContent(
url):Promise<ContentInfo|undefined>
Defined in: packages/utils/src/content.ts:609
Head content metadata
Parameters
url
string
memory URL
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:576
Put content into memory
Parameters
url
string
memory URL
body
content to store
options?
write options
Returns
Promise<ContentInfo>
ContentInfo