Interface FileSystem

interface FileSystem {
    exists: ((path) => Promise<boolean>);
    mkdir: ((path) => Promise<void>);
    readFile: ((path) => Promise<Buffer>);
    readdir: ((path) => Promise<string[]>);
    rename: ((oldPath, newPath) => Promise<void>);
    rmdir: ((path) => Promise<void>);
    stat: ((path) => Promise<Stats>);
    unlink: ((path) => Promise<void>);
    writeFile: ((path, content) => Promise<void>);
}

Properties

exists: ((path) => Promise<boolean>)

Type declaration

    • (path): Promise<boolean>
    • Parameters

      • path: string

      Returns Promise<boolean>

mkdir: ((path) => Promise<void>)

Type declaration

    • (path): Promise<void>
    • Parameters

      • path: string

      Returns Promise<void>

readFile: ((path) => Promise<Buffer>)

Type declaration

    • (path): Promise<Buffer>
    • Parameters

      • path: string

      Returns Promise<Buffer>

readdir: ((path) => Promise<string[]>)

Type declaration

    • (path): Promise<string[]>
    • Parameters

      • path: string

      Returns Promise<string[]>

rename: ((oldPath, newPath) => Promise<void>)

Type declaration

    • (oldPath, newPath): Promise<void>
    • Parameters

      • oldPath: string
      • newPath: string

      Returns Promise<void>

rmdir: ((path) => Promise<void>)

Type declaration

    • (path): Promise<void>
    • Parameters

      • path: string

      Returns Promise<void>

stat: ((path) => Promise<Stats>)

Type declaration

    • (path): Promise<Stats>
    • Parameters

      • path: string

      Returns Promise<Stats>

unlink: ((path) => Promise<void>)

Type declaration

    • (path): Promise<void>
    • Parameters

      • path: string

      Returns Promise<void>

writeFile: ((path, content) => Promise<void>)

Type declaration

    • (path, content): Promise<void>
    • Parameters

      • path: string
      • content: string | Buffer

      Returns Promise<void>

Generated using TypeDoc