Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • File

Index

Constructors

Methods

Constructors

Protected constructor

  • Returns File

Methods

Static exists

  • exists(filename: string): boolean
  • Determines whether file exists with the specified filename.

    Parameters

    • filename: string

      The name of the file.

    Returns boolean

    Return is dependent on whether file with the specified filename exists.

Static read

  • read(filename: string, encoding?: Utf8 | "utf-8" | Utf16 | "utf-16"): string
  • read(filename: string, encoding: Binary | "binary"): ArrayBuffer
  • Reads content of the file.

    Parameters

    • filename: string

      The name of the file.

    • Optional encoding: Utf8 | "utf-8" | Utf16 | "utf-16"

      The encoding of the file. If not specified, it defaults to "utf-8".

    Returns string

  • Reads content of the file.

    Parameters

    • filename: string

      The name of the file.

    • encoding: Binary | "binary"

      The encoding of the file.

    Returns ArrayBuffer