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:38

Methods

access

access(path): Promise<void>

Parameters

NameType
pathstring

Returns

Promise<void>

Implementation of

CompleteFileSystem.access

Defined in

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


mkdir

mkdir(path, options?): Promise<void>

Parameters

NameType
pathstring
options?unknown

Returns

Promise<void>

Implementation of

CompleteFileSystem.mkdir

Defined in

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


readFile

readFile(path, options?): Promise<string>

Parameters

NameType
pathstring
options?unknown

Returns

Promise<string>

Implementation of

CompleteFileSystem.readFile

Defined in

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


readdir

readdir(path): Promise<string[]>

Parameters

NameType
pathstring

Returns

Promise<string[]>

Implementation of

CompleteFileSystem.readdir

Defined in

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


stat

stat(path): Promise<any>

Parameters

NameType
pathstring

Returns

Promise<any>

Implementation of

CompleteFileSystem.stat

Defined in

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


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:40