MemoryContentStorage
Class: MemoryContentStorage
Defined in: packages/utils/src/content.ts:603
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:607
Schemes
Implementation of
Methods
clear()
clear():
void
Defined in: packages/utils/src/content.ts:722
Clear all stored items
Returns
void
deleteContent()
deleteContent(
url):Promise<void>
Defined in: packages/utils/src/content.ts:714
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:639
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:694
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:661
Put content into memory
Parameters
url
string
memory URL
body
content to store
options?
write options
Returns
Promise<ContentInfo>
ContentInfo