Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/lume/deps/path.ts>posix.sep

🔥 Static site generator for Deno 🦕
Very Popular
Go to Latest
variable posix.sep
import { posix } from "https://deno.land/x/lume@v1.19.2/deps/path.ts";
const { sep } = posix;

Utilities for working with OS-specific file paths.

Codes in the examples uses POSIX path but it automatically use Windows path on Windows. Use methods under posix or win32 object instead to handle non platform specific path like:

import { posix, win32 } from "https://deno.land/std@0.224.0/path/mod.ts";
const p1 = posix.fromFileUrl("file:///home/foo");
const p2 = win32.fromFileUrl("file:///home/foo");
console.log(p1); // "/home/foo"
console.log(p2); // "\\home\\foo"

This module is browser compatible.

type

"/"