@servicenow/sdk - v4.4.1
    Preparing search index...

    An implementation of a file system that exists in memory only.

    Implements

    Index

    Constructors

    Methods

    • Asynchronously copies a file or directory.

      Parameters

      • srcPath: string
      • destPath: string

      Returns Promise<void>

    • Synchronously copies a file or directory.

      Parameters

      • srcPath: string
      • destPath: string

      Returns void

    • Asynchronously deletes the specified file or directory.

      Parameters

      • path: string

      Returns Promise<void>

    • Synchronously deletes the specified file or directory

      Parameters

      • path: string

      Returns void

    • Asynchronously checks if a directory exists.

      Parameters

      • dirPath: string

      Returns Promise<boolean>

    • Synchronously checks if a directory exists.

      Parameters

      • dirPath: string

      Returns boolean

    • Asynchronously checks if a file exists.

      Parameters

      • filePath: string

      Returns Promise<boolean>

      Implementers should throw an errors.FileNotFoundError when it does not exist.

    • Synchronously checks if a file exists.

      Parameters

      • filePath: string

      Returns boolean

      Implementers should throw an errors.FileNotFoundError when it does not exist.

    • Gets the current directory of the environment.

      Returns string

    • Uses pattern matching to find files or directories.

      Parameters

      • patterns: readonly string[]

      Returns Promise<string[]>

    • Synchronously uses pattern matching to find files or directories.

      Parameters

      • patterns: readonly string[]

      Returns string[]

    • Gets if this file system is case sensitive.

      Returns boolean

    • Asynchronously creates a directory at the specified path.

      Parameters

      • dirPath: string

      Returns Promise<void>

    • Synchronously creates a directory at the specified path.

      Parameters

      • dirPath: string

      Returns void

    • Asynchronously moves a file or directory.

      Parameters

      • srcPath: string
      • destPath: string

      Returns Promise<void>

    • Synchronously moves a file or directory.

      Parameters

      • srcPath: string
      • destPath: string

      Returns void

    • Reads all the child directories and files.

      Parameters

      • dirPath: string

      Returns RuntimeDirEntry[]

      Implementers should have this return the full file path.

    • Asynchronously reads a file at the specified path.

      Parameters

      • filePath: string
      • Optionalencoding: string

      Returns Promise<string>

    • Synchronously reads a file at the specified path.

      Parameters

      • filePath: string
      • Optionalencoding: string

      Returns string

    • Asynchronously writes a file to the file system.

      Parameters

      • filePath: string
      • fileText: string

      Returns Promise<void>

    • Synchronously writes a file to the file system.

      Parameters

      • filePath: string
      • fileText: string

      Returns void