Skip to main content
Home
This release is 38 versions behind 1.1.4 — the latest version of @std/path. Jump to latest

Utilities for working with file system paths

This package works with Cloudflare Workers, Deno, Browsers
This package works with Cloudflare Workers
This package works with Deno
This package works with Browsers
JSR Score
94%
Published
2 years ago (0.208.0)

default

Utilities for working with OS-specific file paths.

f
basename

Return the last portion of a path. Trailing directory separators are ignored, and optional suffix is removed.

f
common

Determines the common path from a set of paths, using an optional separator, which defaults to the OS default separator.

v
delimiter
No documentation available
f
dirname

Return the directory path of a path.

f
extname

Return the extension of the path with leading period.

f
format

Generate a path from FormatInputPathObject object.

T
FormatInputPathObject
No documentation available
f
fromFileUrl

Converts a file URL to a path string.

f
globToRegExp

Convert a glob string to a regular expression.

T
GlobToRegExpOptions
No documentation available
f
isAbsolute

Verifies whether provided path is absolute

f
isGlob

Test whether the given string is a glob

f
join

Join all given a sequence of paths,then normalizes the resulting path.

f
joinGlobs

Like join(), but doesn't collapse "**/.." when globstar is true.

f
normalize

Normalize the path, resolving '..' and '.' segments. Note that resolving these segments does not necessarily mean that all will be eliminated. A '..' at the top-level will be preserved, and an empty path is canonically '.'.

f
normalizeGlob

Like normalize(), but doesn't collapse "**/.." when globstar is true.

f
parse

Return a ParsedPath object of the path.

I
ParsedPath

A parsed path object generated by path.parse() or consumed by path.format().

f
relative

Return the relative path from from to to based on current working directory.

f
resolve

Resolves path segments into a path

v
SEP
No documentation available
v
sep
No documentation available
v
SEP_PATTERN
No documentation available
f
toFileUrl

Converts a path string to a file URL.

f
toNamespacedPath

Resolves path to a namespace path

v
posix
No documentation available
v
win32
No documentation available
f
basename

Return the last portion of a path. Trailing directory separators are ignored, and optional suffix is removed.

f
common

Determines the common path from a set of paths, using an optional separator, which defaults to the OS default separator.

f
dirname

Return the directory path of a path.

f
extname

Return the extension of the path with leading period.

f
format

Generate a path from FormatInputPathObject object.

f
fromFileUrl

Converts a file URL to a path string.

I
GlobOptions
No documentation available
f
globToRegExp

Convert a glob string to a regular expression.

T
GlobToRegExpOptions
No documentation available
f
isGlob

Test whether the given string is a glob

f
joinGlobs

Like join(), but doesn't collapse "**/.." when globstar is true.

f
normalizeGlob

Like normalize(), but doesn't collapse "**/.." when globstar is true.

f
globToRegExp

Convert a glob string to a regular expression.

T
GlobToRegExpOptions
No documentation available
f
isAbsolute

Verifies whether provided path is absolute

f
isGlob

Test whether the given string is a glob

f
join

Join all given a sequence of paths,then normalizes the resulting path.

f
joinGlobs

Like join(), but doesn't collapse "**/.." when globstar is true.

f
normalize

Normalize the path, resolving '..' and '.' segments. Note that resolving these segments does not necessarily mean that all will be eliminated. A '..' at the top-level will be preserved, and an empty path is canonically '.'.

f