Options
All
  • Public
  • Public/Protected
  • All
Menu

In memory Project implementation. Primarily intended for testing. BE WARNED: Does not correctly handle permissions and binary files!

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly addedDirectoryPaths

addedDirectoryPaths: string[] = []

Directories added. May contain no files. Must be included when copying to a file system.

Readonly cache

cache: Record<string, object>

id

Private memFiles

memFiles: InMemoryFile[] = []

shouldCache

shouldCache: boolean

Accessors

dirty

  • get dirty(): boolean

fileCount

  • get fileCount(): number

filesSync

  • get filesSync(): File[]

name

  • get name(): string

Methods

add

  • add(f: File): Promise<this>

addDirectory

  • addDirectory(path: string): Promise<this>

addFile

  • addFile(path: string, content: string): Promise<this>

addFileSync

  • addFileSync(path: string, content: string): void

deleteDirectory

  • deleteDirectory(path: string): Promise<this>

deleteDirectorySync

  • deleteDirectorySync(path: string): void

deleteFile

  • deleteFile(path: string): Promise<this>

deleteFileSync

  • deleteFileSync(path: string): this

directoryExistsSync

  • directoryExistsSync(path: string): boolean

fileExistsSync

  • fileExistsSync(path: string): boolean

findFile

  • findFile(path: string): Promise<File>

findFileSync

  • findFileSync(path: string): File

flush

  • flush(): Promise<this>

getFile

  • getFile(path: string): Promise<File>

getFiles

  • getFiles(globPatterns?: string | string[]): Promise<File[]>

Protected getFilesInternal

  • getFilesInternal(globPatterns: string[]): Promise<File[]>

hasDirectory

  • hasDirectory(path: string): Promise<boolean>

hasFile

  • hasFile(path: string): Promise<boolean>

Protected invalidateCache

  • invalidateCache(): void

makeExecutable

  • makeExecutable(path: string): Promise<this>

makeExecutableSync

  • makeExecutableSync(path: string): void

moveFile

  • moveFile(oldPath: string, newPath: string): Promise<this>

recordAction

recordAddFile

  • recordAddFile(path: string, content: string): this

recordDeleteFile

  • recordDeleteFile(path: string): this

streamFiles

  • streamFiles(...globPatterns: string[]): FileStream

streamFilesRaw

  • streamFilesRaw(globPatterns: string[], opts: Options): FileStream

totalFileCount

  • totalFileCount(): Promise<number>

trackFile

Static cache

Static from

Static of

Generated using TypeDoc