Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace path

Index

Type aliases

DirectoryPath

DirectoryPath: { directory: Path }

Type declaration

DistinctivePath

DistinctivePath: DirectoryPath | FilePath

The primarily used type for paths.

FilePath

FilePath: { file: Path }

Type declaration

Path

Path: string[]

Functions

combine

directory

file

fromPosix

  • Transform a string into a DistinctivePath.

    Directories should have the format path/to/dir/ and files should have the format path/to/file.

    Leading forward slashes are removed too, so you can pass absolute paths.

    Parameters

    • path: string

    Returns DistinctivePath

isBranch

isDirectory

isFile

isRootDirectory

isSameBranch

isSameKind

kind

log

  • log(path: Path): string
  • Render a raw Path to a string for logging purposes.

    Parameters

    Returns string

map

parent

removeBranch

root

toPosix

  • toPosix(path: DistinctivePath, __namedParameters?: { absolute: boolean }): string
  • Transform a DistinctivePath into a string.

    Directories will have the format path/to/dir/ and files will have the format path/to/file.

    Parameters

    • path: DistinctivePath
    • __namedParameters: { absolute: boolean } = ...
      • absolute: boolean

    Returns string

unwrap

Generated using TypeDoc