Skip to main content

Class: InMemoryFileSystem

A filesystem implementation that stores files in memory.

Implements

Constructors

constructor

new InMemoryFileSystem(): InMemoryFileSystem

Returns

InMemoryFileSystem

Properties

files

Private files: Record<string, any> = {}

Defined in

packages/core/src/storage/FileSystem.ts:40

Methods

access

access(path): Promise<void>

Parameters

NameType
pathstring

Returns

Promise<void>

Implementation of

CompleteFileSystem.access

Defined in

packages/core/src/storage/FileSystem.ts:57


mkdir

mkdir(path): Promise<undefined>

Parameters

NameType
pathstring

Returns

Promise<undefined>

Implementation of

CompleteFileSystem.mkdir

Defined in

packages/core/src/storage/FileSystem.ts:63


readFile

readFile(path): Promise<string>

Parameters

NameType
pathstring

Returns

Promise<string>

Implementation of

CompleteFileSystem.readFile

Defined in

packages/core/src/storage/FileSystem.ts:50


readRawFile

readRawFile(path): Promise<Buffer>

Parameters

NameType
pathstring

Returns

Promise<Buffer>

Implementation of

CompleteFileSystem.readRawFile

Defined in

packages/core/src/storage/FileSystem.ts:76


readdir

readdir(path): Promise<string[]>

Parameters

NameType
pathstring

Returns

Promise<string[]>

Implementation of

CompleteFileSystem.readdir

Defined in

packages/core/src/storage/FileSystem.ts:68


stat

stat(path): Promise<any>

Parameters

NameType
pathstring

Returns

Promise<any>

Implementation of

CompleteFileSystem.stat

Defined in

packages/core/src/storage/FileSystem.ts:72


writeFile

writeFile(path, content, options?): Promise<void>

Parameters

NameType
pathstring
contentstring
options?unknown

Returns

Promise<void>

Implementation of

CompleteFileSystem.writeFile

Defined in

packages/core/src/storage/FileSystem.ts:42