mirror of
https://github.com/denoland/deno.git
synced 2024-12-11 10:07:54 -05:00
a8f74aa381
- Fix protocol regex. - Truncate repeated leading slashes in file paths. - Make drive letter support platform-independent. - Drop the hostname if a drive letter is parsed. - Fix drive letter normalization and basing. - Allow basing over the host. - Fix same-protocol basing. - Remove Windows UNC path support. - Reverts #6418. This is non-standard. Wouldn't be too much of a problem but it makes other parts of the spec hard to realize. |
||
---|---|---|
.. | ||
_constants.ts | ||
_globrex.ts | ||
_globrex_test.ts | ||
_interface.ts | ||
_util.ts | ||
basename_test.ts | ||
common.ts | ||
common_test.ts | ||
dirname_test.ts | ||
extname_test.ts | ||
from_file_url_test.ts | ||
glob.ts | ||
glob_test.ts | ||
isabsolute_test.ts | ||
join_test.ts | ||
mod.ts | ||
parse_format_test.ts | ||
posix.ts | ||
README.md | ||
relative_test.ts | ||
resolve_test.ts | ||
separator.ts | ||
win32.ts | ||
zero_length_strings_test.ts |
Deno Path Manipulation Libraries
Usage:
import * as path from "https://deno.land/std/path/mod.ts";
globToRegExp
Generate a regex based on glob pattern and options This was meant to be using
the the fs.walk
function but can be used anywhere else.
import { globToRegExp } from "https://deno.land/std/path/glob.ts";
globToRegExp("foo/**/*.json", {
flags: "g",
extended: true,
globstar: true,
}); // returns the regex to find all .json files in the folder foo