Options
All
  • Public
  • Public/Protected
  • All
Menu

Class File

Represents a file

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

  • new File(filename: string): File

Properties

Readonly filename

filename: string

The name of the file

Methods

append

  • append(data: string): Promise<void>
  • Appends content to the end of the file

    Parameters

    • data: string

      The content to append

    Returns Promise<void>

clear

  • clear(): Promise<void>

exists

  • exists(): Promise<boolean>
  • Returns whether the file exists

    Returns Promise<boolean>

read

  • read(): Promise<string>
  • Reads the content of the file

    Returns Promise<string>

write

  • write(data: string): Promise<void>
  • Writes to a file

    Parameters

    • data: string

      The data to write to the file

    Returns Promise<void>

Generated using TypeDoc