InMemoryFs
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InMemoryFs(initialFiles?): InMemoryFs;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”InMemoryFs
Methods
Section titled “Methods”appendFile()
Section titled “appendFile()”appendFile(path, content): Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”cp( src, dest,options?): Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”exists()
Section titled “exists()”exists(path): Promise<boolean>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<boolean>
Implementation of
Section titled “Implementation of”glob()
Section titled “glob()”glob(pattern): Promise<string[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<string[]>
Implementation of
Section titled “Implementation of”lstat()
Section titled “lstat()”lstat(path): Promise<FsStat>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<FsStat>
Implementation of
Section titled “Implementation of”mkdir()
Section titled “mkdir()”mkdir(path, options?): Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”mkdirSync()
Section titled “mkdirSync()”mkdirSync(path, options?): void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”void
mv(src, dest): Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”readdir()
Section titled “readdir()”readdir(path): Promise<string[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<string[]>
Implementation of
Section titled “Implementation of”readdirWithFileTypes()
Section titled “readdirWithFileTypes()”readdirWithFileTypes(path): Promise<FileSystemDirent[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<FileSystemDirent[]>
Implementation of
Section titled “Implementation of”FileSystem.readdirWithFileTypes
readFile()
Section titled “readFile()”readFile(path, options?): Promise<string>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”Promise<string>
Implementation of
Section titled “Implementation of”readFileBytes()
Section titled “readFileBytes()”readFileBytes(path): Promise<Uint8Array<ArrayBufferLike>>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>
Implementation of
Section titled “Implementation of”readlink()
Section titled “readlink()”readlink(path): Promise<string>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<string>
Implementation of
Section titled “Implementation of”realpath()
Section titled “realpath()”realpath(path): Promise<string>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<string>
Implementation of
Section titled “Implementation of”resolvePath()
Section titled “resolvePath()”resolvePath(base, path): string;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Section titled “Returns”string
Implementation of
Section titled “Implementation of”rm(path, options?): Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”stat()
Section titled “stat()”stat(path): Promise<FsStat>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<FsStat>
Implementation of
Section titled “Implementation of”symlink()
Section titled “symlink()”symlink(target, linkPath): Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”writeFile()
Section titled “writeFile()”writeFile( path, content,options?): Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”writeFileBytes()
Section titled “writeFileBytes()”writeFileBytes(path, content): Promise<void>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”writeFileLazy()
Section titled “writeFileLazy()”writeFileLazy( path, lazy, metadata?): void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
() => | |
|
|
{ |
|
|
|
|
|
|
Returns
Section titled “Returns”void
writeFileSync()
Section titled “writeFileSync()”writeFileSync( path, content, options?, metadata?): void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
Returns
Section titled “Returns”void