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

@std/path@0.220.1
Built and signed on GitHub Actions

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.220.1)

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

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@std/path

Import symbol

import * as path from "@std/path";
or

Import directly with a jsr specifier

import * as path from "jsr:@std/path";