Hierarchy

  • Filesystem

Methods

  • Parameters

    • path: string

      The path to append to the file.

    • data: Uint8Array

      The data to append, for example, util.bufferToString("hello")

    Returns void

  • Creates a folder/directory.

    Parameters

    • path: string

      The path to create a directory.

    Returns void

  • Checks if a file or a directory exists

    Parameters

    • path: string

      The path to check if a file or directory exists

    Returns boolean

  • Reads a file from the path specified.

    Parameters

    • path: string

      The relative path from the script.

    Returns Uint8Array

  • Reads a file asynchronously.

    Parameters

    • path: string

      The path to read from.

    • callback: ((err, content) => void)

      This will get called when the operation is finished

        • (err, content): void
        • Parameters

          • err: number
          • content: Uint8Array

          Returns void

    Returns void

  • Writes a file to the path specified.

    Parameters

    • path: string

      The relative path from the script.

    • data: Uint8Array

      The data to write. For example, util.stringToBuffer("hello")

    Returns void

  • Parameters

    • path: string

      The path to write to

    • data: Uint8Array

      The data to write (see util.stringToBuffer to convert a string to a buffer)

    • callback: ((err) => void)

      This will get called when the operation is finished

        • (err): void
        • Parameters

          • err: number

          Returns void

    Returns void

Generated using TypeDoc