@environment-safe/file 0.0.1 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.husky/pre-commit +5 -3
- package/README.md +25 -7
- package/package.json +19 -5
- package/src/buffer.d.mts +5 -0
- package/src/buffer.mjs +9 -3
- package/src/filesystem.d.mts +47 -0
- package/src/filesystem.mjs +449 -0
- package/src/index.d.mts +27 -0
- package/src/index.mjs +146 -519
- package/src/path.d.mts +35 -0
- package/src/path.mjs +835 -0
- package/test/isolated/crud.mjs +0 -0
- package/test/isolated/path.mjs +48 -0
- package/test/isolated-path.html +448 -0
- package/test/test.html +466 -0
- package/test/test.mjs +78 -22
- /package/test/{index.html → local-file-test.html} +0 -0
package/src/path.d.mts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export class Path {
|
|
2
|
+
static browserLocations: string[];
|
|
3
|
+
static from(str: any): Path;
|
|
4
|
+
static location(name: any): any;
|
|
5
|
+
static isLocation(path: any): boolean;
|
|
6
|
+
static within(path: any, subpath: any): boolean;
|
|
7
|
+
static relative(to: any, from: any): any;
|
|
8
|
+
static join(...parts: any[]): string;
|
|
9
|
+
constructor(url: any);
|
|
10
|
+
parsed: {
|
|
11
|
+
type: string;
|
|
12
|
+
windows: {
|
|
13
|
+
name: any;
|
|
14
|
+
root: string;
|
|
15
|
+
drive: any;
|
|
16
|
+
ext: string;
|
|
17
|
+
dir: string;
|
|
18
|
+
base: any;
|
|
19
|
+
};
|
|
20
|
+
url: URL;
|
|
21
|
+
posix: {
|
|
22
|
+
root: string;
|
|
23
|
+
dir: string;
|
|
24
|
+
base: string;
|
|
25
|
+
ext: string;
|
|
26
|
+
name: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
toUrl(type: any, relative: any): any;
|
|
30
|
+
toString(): any;
|
|
31
|
+
}
|
|
32
|
+
export namespace Path {
|
|
33
|
+
let current: any;
|
|
34
|
+
let user: string;
|
|
35
|
+
}
|