deno.land / std@0.224.0 / fs / _is_same_path.ts

_is_same_path.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.// Copyright the Browserify authors. MIT License.
import { resolve } from "../path/resolve.ts";import { toPathString } from "./_to_path_string.ts";
/** * Test whether `src` and `dest` resolve to the same location * @param src src file path * @param dest dest file path */export function isSamePath( src: string | URL, dest: string | URL,): boolean | void { src = toPathString(src); dest = toPathString(dest);
return resolve(src) === resolve(dest);}
std

Version Info

Tagged at
3 weeks ago