Represents the real location of the Git data directory.

  • In standalone repos this is .git/
  • If the contracts workspace repository is a submodule, .git will be a file containing e.g. "gitdir: ../.git/modules/something"

Hierarchy

  • Path
    • DotGit

Constructors

  • Parameters

    • base: string | URL
    • Rest ...fragments: string[]

    Returns DotGit

Properties

isSubmodule: boolean = false

Whether the workspace's repository is a submodule and its .git is a pointer to the parent's .git/modules

log: Console = ...
path: string

The filesystem path represented by this object.

present: boolean

Whether a .git is present

rootRepoRE: RegExp = ...
separator: "\\" | "/" = sep

Accessors

  • Returns boolean

    true if this path is a symlink.

  • get name(): string
  • Returns string

    name of this file or directory.

  • get parent(): string
  • Returns string

    absolute path to parent directory.

  • get real(): this
  • Returns this

  • get shortPath(): string
  • Returns string

    a dotless relative path if this path is under the current working directory, otherwise returns an absolute path.

  • get target(): null | this
  • Returns null | this

  • get url(): URL
  • Returns URL

    this path represented as a file:/// URL

Methods

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

    Parameters

    • path: string | Path

    Returns DotGit

  • Type Parameters

    • T

    • U extends BaseFile<T> | BaseDirectory<T, BaseFile<T>>

    Parameters

    • Ctor: PathCtor<U>

    Returns U

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

  • Returns DotGit

  • Parameters

    • Rest ...fragments: string[]

    Returns Path

    Path to directory relative to this.

  • Returns DotGit

  • Type Parameters

    • T

    Parameters

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

          • argv: string[]

          Returns T

    Returns undefined | T

  • Returns null | Stats

  • Parameters

    • Rest ...fragments: string[]

    Returns Path

    Path to file relative to this.

  • Parameters

    • Optional name: string

    Returns boolean

    true if a directory exists at this.path

  • Parameters

    • Optional name: string

    Returns boolean

    true if a file exists at this.path

  • Returns DotGit

  • Create the parent directory of this path.

    Returns DotGit

  • Turn this entry into a symlink to Path.

    Parameters

    • path: string

    Returns DotGit

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

    Parameters

    • path: string

    Returns DotGit

  • Parameters

    • path: string | Path

    Returns string

  • Parameters

    • path: string

    Returns string

Generated using TypeDoc