Hierarchy (view full)

Constructors

  • Parameters

    • base: ToPath = ...
    • Rest ...fragments: string[]

    Returns File

Properties

absolute: string

The resolved absolute filesystem path represented by this object.

format: {
    load<T>(data): T;
    save(data): any;
} = Text

Type declaration

  • load:function
    • Type Parameters

      • T

      Parameters

      • data: unknown

      Returns T

  • save:function
    • Parameters

      • data: unknown

      Returns any

separator: "\\" | "/" = sep

Accessors

  • get [toStringTag](): string
  • Returns string

  • get dirname(): string
  • Returns string

    absolute path to parent directory.

  • Returns boolean

    true if this.absolute is a symlink.

  • get name(): string
  • Returns string

    name of this file or directory.

  • get parent(): Directory
  • Returns Directory

    absolute path to parent directory.

  • get real(): this
  • Returns this

  • get relativePath(): string
  • Returns string

  • get short(): string
  • Returns string

  • get shortPath(): string
  • Returns string

  • get target(): this
  • Returns this

  • get url(): URL
  • Returns URL

    this.absolute represented as a file:/// URL

Methods

  • Turn this entry into a symlink to an absolute path.

    Parameters

    Returns this

  • Type Parameters

    • T

    • U extends (new (path) => T)

    Parameters

    • Ctor: U

    Returns T

    an instance of the passed class, pointing to this.absolute, and (hopefully) knowing what to do with the data at this.absolute.

  • Returns this

  • Parameters

    • Optional ext: string

    Returns string

    name of this file or directory.

  • Returns this

  • Type Parameters

    • T

    Parameters

    • fn: ((data) => T)
        • (data): T
        • Parameters

          • data: T

          Returns T

    Returns this

  • Type Parameters

    • T

    Parameters

    • command: ((argv) => T)
        • (argv): T
        • Parameters

          • argv: string[]

          Returns T

    Returns T

  • Returns Stats

  • Parameters

    • Optional name: string

    Returns boolean

    true if a directory exists at this.absolute

  • Parameters

    • Optional name: string

    Returns boolean

    true if a file exists at this.absolute

  • Type Parameters

    • T

    Returns T

  • Returns Uint8Array

  • Parameters

    • encoding: BufferEncoding = 'utf8'

    Returns string

  • Returns File

  • Create the parent directory of this.absolute.

    Returns this

  • Turn this entry into a symlink to Path.

    Parameters

    • path: string

    Returns this

  • Turn this entry into a symlink to a relative path.

    Parameters

    • path: string

    Returns this

  • Parameters

    • base: string = ...

    Returns string

  • Parameters

    • target: string = ...

    Returns string

  • Parameters

    • path: string

    Returns string

  • Parameters

    • data: any

    Returns this

  • Parameters

    • data: Uint8Array

    Returns this

  • Parameters

    • data: string
    • encoding: BufferEncoding = 'utf8'

    Returns File

  • Parameters

    • format: {
          load<T>(data): T;
          save(data): any;
      }
      • load:function
        • Type Parameters

          • T

          Parameters

          • data: unknown

          Returns T

      • save:function
        • Parameters

          • data: unknown

          Returns any

    Returns File

  • Returns string

Generated using TypeDoc