Methods

  • Copies a file.

    Parameters

    • sourceFilePath: string

      The path of the file to copy.

    • destinationFilePath: string

      The path where the file will be copied.

    Returns Promise<void>

  • Deletes a file.

    Parameters

    • filePath: string

      The path of the file to delete.

    Returns Promise<void>

  • Moves a file.

    Parameters

    • sourceFilePath: string

      The path of the file to move.

    • destinationFilePath: string

      The path where the file will be moved.

    Returns Promise<void>

  • Opens a file for reading or writing.

    Parameters

    • filePath: string

      The path of the file to open.

    • openType: "read"

      The way in which the file is opened.

      'read' - the file can only be read.

      'write' - the file will be created (an existing file with the same name will be erased) and the file can only be written to.

      'append' - the file will be created if it does not exist and the file can only be written to. Any text written to the file will be added to the end.

    Returns Promise<LocalFileReadHandle>

    LocalFileHandle

  • Opens a file for reading or writing.

    Parameters

    • filePath: string

      The path of the file to open.

    • openType: "write"

      The way in which the file is opened.

      'read' - the file can only be read.

      'write' - the file will be created (an existing file with the same name will be erased) and the file can only be written to.

      'append' - the file will be created if it does not exist and the file can only be written to. Any text written to the file will be added to the end.

    Returns Promise<LocalFileWriteHandle>

    LocalFileHandle

  • Opens a file for reading or writing.

    Parameters

    • filePath: string

      The path of the file to open.

    • openType: "append"

      The way in which the file is opened.

      'read' - the file can only be read.

      'write' - the file will be created (an existing file with the same name will be erased) and the file can only be written to.

      'append' - the file will be created if it does not exist and the file can only be written to. Any text written to the file will be added to the end.

    Returns Promise<LocalFileWriteHandle>

    LocalFileHandle