Skip to main content Link Search Menu Expand Document (external link)

Path.ts overview

Since v1.0.0


Exports Grouped by Category


layer

layer

An implementation of the Path interface that can be used in all environments (including browsers).

It uses the POSIX standard for paths.

Signature

declare const layer: Layer<Path>

Source

Since v1.0.0

model

Path (interface)

Signature

export interface Path {
  readonly [TypeId]: TypeId
  readonly sep: string
  readonly basename: (path: string, suffix?: string) => string
  readonly dirname: (path: string) => string
  readonly extname: (path: string) => string
  readonly format: (pathObject: Partial<Path.Parsed>) => string
  readonly fromFileUrl: (url: URL) => Effect<string, BadArgument>
  readonly isAbsolute: (path: string) => boolean
  readonly join: (...paths: ReadonlyArray<string>) => string
  readonly normalize: (path: string) => string
  readonly parse: (path: string) => Path.Parsed
  readonly relative: (from: string, to: string) => string
  readonly resolve: (...pathSegments: ReadonlyArray<string>) => string
  readonly toFileUrl: (path: string) => Effect<URL, BadArgument>
  readonly toNamespacedPath: (path: string) => string
}

Source

Since v1.0.0

tag

Path

Signature

declare const Path: Tag<Path, Path>

Source

Since v1.0.0

type ids

TypeId

Signature

declare const TypeId: unique symbol

Source

Since v1.0.0

TypeId (type alias)

Signature

type TypeId = typeof TypeId

Source

Since v1.0.0

utils

Path (namespace)

Source

Since v1.0.0

Parsed (interface)

Signature

export interface Parsed {
  readonly root: string
  readonly dir: string
  readonly base: string
  readonly ext: string
  readonly name: string
}

Source

Since v1.0.0