This release is 20 versions behind 1.1.4 — the latest version of @std/path. Jump to latest
Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
Utilities for working with file system paths
This package works with Cloudflare Workers, Deno, Browsers


JSR Score
94%
Published
2 years ago (0.222.0)
Utilities for working with OS-specific file paths.
Functions from this module will automatically switch to support the path style
of the current OS, either windows for Microsoft Windows, or posix for
every other operating system, eg. Linux, MacOS, BSD etc.
To use functions for a specific path style regardless of the current OS import the modules from the platform sub directory instead.
Example, for posix:
import { fromFileUrl } from "@std/path/posix/from-file-url"; const p = fromFileUrl("file:///home/foo"); console.log(p); // "/home/foo"
or, for windows:
import { fromFileUrl } from "@std/path/windows/from-file-url"; const p = fromFileUrl("file:///home/foo"); console.log(p); // "\\home\\foo"
This module is browser compatible.
Built and signed on
GitHub Actions
Add Package
deno add jsr:@std/path
Import symbol
import * as path from "@std/path";
Import directly with a jsr specifier
import * as path from "jsr:@std/path";