view-ignored 0.4.8 → 0.5.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/README.md +84 -103
- package/out/index.d.ts +1 -4
- package/out/index.js +1 -4
- package/out/patterns/gitignore.d.ts +3 -0
- package/out/patterns/gitignore.js +35 -0
- package/out/patterns/index.d.ts +4 -0
- package/out/patterns/index.js +4 -0
- package/out/patterns/jsrjson.d.ts +4 -0
- package/out/patterns/jsrjson.js +39 -0
- package/out/patterns/matcher.d.ts +102 -0
- package/out/patterns/matcher.js +125 -0
- package/out/patterns/packagejson.d.ts +3 -0
- package/out/patterns/packagejson.js +25 -0
- package/out/scan.d.ts +49 -0
- package/out/scan.js +114 -0
- package/out/targets/git.d.ts +2 -0
- package/out/targets/git.js +22 -0
- package/out/targets/index.d.ts +6 -0
- package/out/targets/index.js +6 -0
- package/out/targets/jsr.d.ts +2 -0
- package/out/targets/jsr.js +25 -0
- package/out/targets/npm.d.ts +2 -0
- package/out/targets/npm.js +46 -0
- package/out/targets/target.d.ts +10 -0
- package/out/targets/target.js +1 -0
- package/out/targets/vsce.d.ts +2 -0
- package/out/targets/vsce.js +24 -0
- package/out/targets/yarn.d.ts +2 -0
- package/out/targets/yarn.js +49 -0
- package/out/walk.d.ts +2 -0
- package/out/walk.js +19 -0
- package/package.json +20 -54
- package/bin/viewig +0 -4
- package/out/browser/binds/index.d.ts +0 -56
- package/out/browser/binds/index.d.ts.map +0 -1
- package/out/browser/binds/index.js +0 -95
- package/out/browser/binds/index.js.map +0 -1
- package/out/browser/binds/plugins/git.d.ts +0 -23
- package/out/browser/binds/plugins/git.d.ts.map +0 -1
- package/out/browser/binds/plugins/git.js +0 -67
- package/out/browser/binds/plugins/git.js.map +0 -1
- package/out/browser/binds/plugins/jsr.d.ts +0 -39
- package/out/browser/binds/plugins/jsr.d.ts.map +0 -1
- package/out/browser/binds/plugins/jsr.js +0 -117
- package/out/browser/binds/plugins/jsr.js.map +0 -1
- package/out/browser/binds/plugins/npm.d.ts +0 -39
- package/out/browser/binds/plugins/npm.d.ts.map +0 -1
- package/out/browser/binds/plugins/npm.js +0 -146
- package/out/browser/binds/plugins/npm.js.map +0 -1
- package/out/browser/binds/plugins/vsce.d.ts +0 -26
- package/out/browser/binds/plugins/vsce.d.ts.map +0 -1
- package/out/browser/binds/plugins/vsce.js +0 -71
- package/out/browser/binds/plugins/vsce.js.map +0 -1
- package/out/browser/binds/plugins/yarn.d.ts +0 -12
- package/out/browser/binds/plugins/yarn.d.ts.map +0 -1
- package/out/browser/binds/plugins/yarn.js +0 -36
- package/out/browser/binds/plugins/yarn.js.map +0 -1
- package/out/browser/binds/scanner.d.ts +0 -47
- package/out/browser/binds/scanner.d.ts.map +0 -1
- package/out/browser/binds/scanner.js +0 -166
- package/out/browser/binds/scanner.js.map +0 -1
- package/out/browser/binds/targets.d.ts +0 -78
- package/out/browser/binds/targets.d.ts.map +0 -1
- package/out/browser/binds/targets.js +0 -46
- package/out/browser/binds/targets.js.map +0 -1
- package/out/browser/conc.d.ts +0 -2
- package/out/browser/conc.d.ts.map +0 -1
- package/out/browser/conc.js +0 -19
- package/out/browser/conc.js.map +0 -1
- package/out/browser/errors.d.ts +0 -47
- package/out/browser/errors.d.ts.map +0 -1
- package/out/browser/errors.js +0 -35
- package/out/browser/errors.js.map +0 -1
- package/out/browser/filtering.d.ts +0 -13
- package/out/browser/filtering.d.ts.map +0 -1
- package/out/browser/filtering.js +0 -12
- package/out/browser/filtering.js.map +0 -1
- package/out/browser/fs/directory.d.ts +0 -145
- package/out/browser/fs/directory.d.ts.map +0 -1
- package/out/browser/fs/directory.js +0 -244
- package/out/browser/fs/directory.js.map +0 -1
- package/out/browser/fs/file-info.d.ts +0 -89
- package/out/browser/fs/file-info.d.ts.map +0 -1
- package/out/browser/fs/file-info.js +0 -101
- package/out/browser/fs/file-info.js.map +0 -1
- package/out/browser/fs/file.d.ts +0 -39
- package/out/browser/fs/file.d.ts.map +0 -1
- package/out/browser/fs/file.js +0 -42
- package/out/browser/fs/file.js.map +0 -1
- package/out/browser/fs/index.d.ts +0 -5
- package/out/browser/fs/index.d.ts.map +0 -1
- package/out/browser/fs/index.js +0 -5
- package/out/browser/fs/index.js.map +0 -1
- package/out/browser/fs/source-info.d.ts +0 -29
- package/out/browser/fs/source-info.d.ts.map +0 -1
- package/out/browser/fs/source-info.js +0 -31
- package/out/browser/fs/source-info.js.map +0 -1
- package/out/browser/index.d.ts +0 -4
- package/out/browser/index.d.ts.map +0 -1
- package/out/browser/index.js +0 -4
- package/out/browser/index.js.map +0 -1
- package/out/browser/lib.d.ts +0 -138
- package/out/browser/lib.d.ts.map +0 -1
- package/out/browser/lib.js +0 -93
- package/out/browser/lib.js.map +0 -1
- package/out/browser/sorting.d.ts +0 -52
- package/out/browser/sorting.d.ts.map +0 -1
- package/out/browser/sorting.js +0 -137
- package/out/browser/sorting.js.map +0 -1
- package/out/browser/styling.d.ts +0 -92
- package/out/browser/styling.d.ts.map +0 -1
- package/out/browser/styling.js +0 -66
- package/out/browser/styling.js.map +0 -1
- package/out/cli.d.ts +0 -90
- package/out/cli.d.ts.map +0 -1
- package/out/cli.js +0 -360
- package/out/cli.js.map +0 -1
- package/out/config.d.ts +0 -186
- package/out/config.d.ts.map +0 -1
- package/out/config.js +0 -370
- package/out/config.js.map +0 -1
- package/out/errors.d.ts +0 -7
- package/out/errors.d.ts.map +0 -1
- package/out/errors.js +0 -3
- package/out/errors.js.map +0 -1
- package/out/index.d.ts.map +0 -1
- package/out/index.js.map +0 -1
- package/out/lib.d.ts +0 -5
- package/out/lib.d.ts.map +0 -1
- package/out/lib.js +0 -5
- package/out/lib.js.map +0 -1
- package/out/styling.d.ts +0 -5
- package/out/styling.d.ts.map +0 -1
- package/out/styling.js +0 -49
- package/out/styling.js.map +0 -1
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { type ParsedPath } from 'node:path';
|
|
2
|
-
import EventEmitter from 'node:events';
|
|
3
|
-
import { type RealScanOptions } from '../lib.js';
|
|
4
|
-
import { File } from './file.js';
|
|
5
|
-
export type DeepStreamEventEmitter = EventEmitter<DeepStreamEventMap> & {
|
|
6
|
-
endPromise: Promise<DeepStreamDataRoot>;
|
|
7
|
-
run(): Promise<DeepStreamDataRoot>;
|
|
8
|
-
};
|
|
9
|
-
export type DeepStreamDataRoot = {
|
|
10
|
-
tree: Directory;
|
|
11
|
-
progress: DeepStreamProgress;
|
|
12
|
-
};
|
|
13
|
-
export type DeepStreamData = {
|
|
14
|
-
target: Entry;
|
|
15
|
-
progress: DeepStreamProgress;
|
|
16
|
-
};
|
|
17
|
-
export type DeepStreamProgress = {
|
|
18
|
-
directories: number;
|
|
19
|
-
files: number;
|
|
20
|
-
current: number;
|
|
21
|
-
total: number;
|
|
22
|
-
};
|
|
23
|
-
export type DeepStreamEventMap = {
|
|
24
|
-
data: [DeepStreamData];
|
|
25
|
-
end: [DeepStreamDataRoot];
|
|
26
|
-
progress: [DeepStreamProgress];
|
|
27
|
-
};
|
|
28
|
-
export type DeepStream = ReadableStream<Entry>;
|
|
29
|
-
/**
|
|
30
|
-
* @internal
|
|
31
|
-
*/
|
|
32
|
-
type DeepStreamNestedOptions = DeepStreamOptions & {
|
|
33
|
-
controller?: DeepStreamEventEmitter;
|
|
34
|
-
parent?: Directory;
|
|
35
|
-
progress?: DeepStreamProgress;
|
|
36
|
-
};
|
|
37
|
-
export type DeepCountOptions = Pick<DeepStreamNestedOptions, 'modules' | 'cwd' | 'concurrency' | 'progress'>;
|
|
38
|
-
export type DeepModifiedTimeOptions = Pick<RealScanOptions, 'concurrency' | 'modules'>;
|
|
39
|
-
export type DeepStreamOptions = Pick<RealScanOptions, 'cwd' | 'modules' | 'concurrency'>;
|
|
40
|
-
export type Entry = Directory | File;
|
|
41
|
-
export type EntryClass = typeof Directory | typeof File;
|
|
42
|
-
export type EntryInstanceFrom<T extends undefined | EntryClass> = T extends undefined ? Entry : T extends typeof Directory ? Directory : File;
|
|
43
|
-
/**
|
|
44
|
-
* File system directory representation.
|
|
45
|
-
*/
|
|
46
|
-
export declare class Directory implements ParsedPath {
|
|
47
|
-
/**
|
|
48
|
-
* The parent of the directory.
|
|
49
|
-
*/
|
|
50
|
-
readonly parent: Directory | undefined;
|
|
51
|
-
/**
|
|
52
|
-
* The relative path to the directory.
|
|
53
|
-
*/
|
|
54
|
-
readonly relativePath: string;
|
|
55
|
-
/**
|
|
56
|
-
* The absolute path to the file.
|
|
57
|
-
*/
|
|
58
|
-
readonly absolutePath: string;
|
|
59
|
-
/**
|
|
60
|
-
* The content of the directory. It is a Map for performance reasons: you can find any file or folder without a loop if you know the name.
|
|
61
|
-
*
|
|
62
|
-
* Keys: {@link File.base} or {@link Directory.base}. Directory base ends with '/'.
|
|
63
|
-
*
|
|
64
|
-
* Values: {@link File} or {@link Directory} itself.
|
|
65
|
-
*/
|
|
66
|
-
readonly children: Map<string, Entry>;
|
|
67
|
-
/**
|
|
68
|
-
* Get the number of directories and files.
|
|
69
|
-
* @param directoryPath Relative path to the directory.
|
|
70
|
-
* @param options The counter and reader options.
|
|
71
|
-
*/
|
|
72
|
-
static deepCount(directoryPath: {
|
|
73
|
-
toString(): string;
|
|
74
|
-
}, options: DeepCountOptions): Promise<DeepStreamProgress>;
|
|
75
|
-
/**
|
|
76
|
-
* Read directories and files progressively.
|
|
77
|
-
* @param directoryPath Relative path to the directory.
|
|
78
|
-
* @param options The reader options.
|
|
79
|
-
*/
|
|
80
|
-
static deepStream(directoryPath: string, optionsReal: DeepStreamOptions): DeepStreamEventEmitter;
|
|
81
|
-
/**
|
|
82
|
-
* Get the {@link Directory} instance from a file path list. Paths should be relative.
|
|
83
|
-
*/
|
|
84
|
-
static from(pathList: Array<{
|
|
85
|
-
toString(): string;
|
|
86
|
-
}>, cwd?: string): Directory;
|
|
87
|
-
/**
|
|
88
|
-
* Get deep iterator for the directory.
|
|
89
|
-
*/
|
|
90
|
-
static deepIterator: <T extends undefined | EntryClass>(directory: Directory, instanceOf?: T) => IterableIterator<EntryInstanceFrom<T>>;
|
|
91
|
-
/**
|
|
92
|
-
* Read directories and files progressively.
|
|
93
|
-
* @internal This function should be wrapped by {@link deepStream}.
|
|
94
|
-
* @param directoryPath Relative path to the directory.
|
|
95
|
-
* @param options The reader options.
|
|
96
|
-
*/
|
|
97
|
-
private static deepStreamNested;
|
|
98
|
-
readonly base: string;
|
|
99
|
-
readonly dir: string;
|
|
100
|
-
readonly ext: string;
|
|
101
|
-
readonly name: string;
|
|
102
|
-
readonly root: string;
|
|
103
|
-
constructor(
|
|
104
|
-
/**
|
|
105
|
-
* The parent of the directory.
|
|
106
|
-
*/
|
|
107
|
-
parent: Directory | undefined,
|
|
108
|
-
/**
|
|
109
|
-
* The relative path to the directory.
|
|
110
|
-
*/
|
|
111
|
-
relativePath: string,
|
|
112
|
-
/**
|
|
113
|
-
* The absolute path to the file.
|
|
114
|
-
*/
|
|
115
|
-
absolutePath: string,
|
|
116
|
-
/**
|
|
117
|
-
* The content of the directory. It is a Map for performance reasons: you can find any file or folder without a loop if you know the name.
|
|
118
|
-
*
|
|
119
|
-
* Keys: {@link File.base} or {@link Directory.base}. Directory base ends with '/'.
|
|
120
|
-
*
|
|
121
|
-
* Values: {@link File} or {@link Directory} itself.
|
|
122
|
-
*/
|
|
123
|
-
children: Map<string, Entry>);
|
|
124
|
-
/**
|
|
125
|
-
* @param instanceOf Optionally filter children by type.
|
|
126
|
-
*/
|
|
127
|
-
deepIterator<T extends undefined | typeof File | typeof Directory>(instanceOf?: T): IterableIterator<EntryInstanceFrom<T>>;
|
|
128
|
-
/**
|
|
129
|
-
* @param instanceOf Optionally filter children by type.
|
|
130
|
-
*/
|
|
131
|
-
deep<T extends undefined | typeof File | typeof Directory>(instanceOf?: T): EntryInstanceFrom<T>[];
|
|
132
|
-
/**
|
|
133
|
-
* @returns The relative path to the directory.
|
|
134
|
-
*/
|
|
135
|
-
toString(): string;
|
|
136
|
-
get<T extends string>(key: T): (T extends `${string}/` ? Directory : File) | undefined;
|
|
137
|
-
set<T extends string>(key: T, value: T extends `${string}/` ? Directory : File): typeof this.children;
|
|
138
|
-
/**
|
|
139
|
-
* @returns The cache for each file of the directory with last time edited number.
|
|
140
|
-
* @see {@link modified}.
|
|
141
|
-
*/
|
|
142
|
-
deepModifiedTime(out: Map<File, number>, realOptions: DeepModifiedTimeOptions): Promise<Map<File, number>>;
|
|
143
|
-
}
|
|
144
|
-
export {};
|
|
145
|
-
//# sourceMappingURL=directory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"directory.d.ts","sourceRoot":"","sources":["../../../src/browser/fs/directory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,UAAU,EAAY,MAAM,WAAW,CAAA;AAClE,OAAO,YAAY,MAAM,aAAa,CAAA;AAGtC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,WAAW,CAAA;AAEhD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGhC,MAAM,MAAM,sBAAsB,GAAG,YAAY,CAAC,kBAAkB,CAAC,GAAG;IACtE,UAAU,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAA;IACvC,GAAG,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAAA;CACnC,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,SAAS,CAAA;IACf,QAAQ,EAAE,kBAAkB,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,KAAK,CAAA;IACb,QAAQ,EAAE,kBAAkB,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,CAAC,cAAc,CAAC,CAA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,EAAE,CAAC,GACL,CAAC,CAAC,SAAS,GAAG,MAAM,GAAG,GAAG,SAAS,GAAG,IAAI,CAAC,GAAG,SAAS;IAM1D,GAAG,CAAC,CAAC,SAAS,MAAM,EAClB,GAAG,EAAE,CAAC,EACN,KAAK,EAAE,CAAC,SAAS,GAAG,MAAM,GAAG,GAAG,SAAS,GAAG,IAAI,GAC/C,OAAO,IAAI,CAAC,QAAQ;IAIvB;;;OAGG;IACG,gBAAgB,CACpB,GAAG,EAAE,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,EACtB,WAAW,EAAE,uBAAuB,GACnC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;CAiB9B"}
|
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
import { join, parse, relative } from 'node:path';
|
|
2
|
-
import EventEmitter from 'node:events';
|
|
3
|
-
import * as FSP from 'node:fs/promises';
|
|
4
|
-
import process from 'node:process';
|
|
5
|
-
import {} from '../lib.js';
|
|
6
|
-
import { configDefault } from '../../config.js';
|
|
7
|
-
import { File } from './file.js';
|
|
8
|
-
import { conc } from '../conc.js';
|
|
9
|
-
/**
|
|
10
|
-
* File system directory representation.
|
|
11
|
-
*/
|
|
12
|
-
export class Directory {
|
|
13
|
-
parent;
|
|
14
|
-
relativePath;
|
|
15
|
-
absolutePath;
|
|
16
|
-
children;
|
|
17
|
-
/**
|
|
18
|
-
* Get the number of directories and files.
|
|
19
|
-
* @param directoryPath Relative path to the directory.
|
|
20
|
-
* @param options The counter and reader options.
|
|
21
|
-
*/
|
|
22
|
-
static async deepCount(directoryPath, options) {
|
|
23
|
-
const { modules, cwd, concurrency, progress = {
|
|
24
|
-
current: 0,
|
|
25
|
-
total: 0,
|
|
26
|
-
files: 0,
|
|
27
|
-
directories: 0,
|
|
28
|
-
}, } = options;
|
|
29
|
-
const readdir = modules.fs.promises.readdir ?? FSP.readdir;
|
|
30
|
-
const absolutePath = modules.path.join(cwd, String(directoryPath));
|
|
31
|
-
const entryList = await readdir(absolutePath, { withFileTypes: true });
|
|
32
|
-
const promises = entryList.map(entry => async () => {
|
|
33
|
-
++progress.total;
|
|
34
|
-
if (entry.isDirectory() && !entry.isSymbolicLink()) {
|
|
35
|
-
const absolutePath = modules.path.join(entry.parentPath, entry.name);
|
|
36
|
-
const relativePath = modules.path.relative(cwd, absolutePath);
|
|
37
|
-
await Directory.deepCount(relativePath, { ...options, progress });
|
|
38
|
-
++progress.directories;
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
++progress.files;
|
|
42
|
-
});
|
|
43
|
-
await conc(promises, concurrency);
|
|
44
|
-
return progress;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Read directories and files progressively.
|
|
48
|
-
* @param directoryPath Relative path to the directory.
|
|
49
|
-
* @param options The reader options.
|
|
50
|
-
*/
|
|
51
|
-
static deepStream(directoryPath, optionsReal) {
|
|
52
|
-
const controller = new EventEmitter();
|
|
53
|
-
controller.endPromise = new Promise((resolve) => {
|
|
54
|
-
controller.once('end', (data) => {
|
|
55
|
-
resolve(data);
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
controller.run = async function () {
|
|
59
|
-
const data = await Directory.deepStreamNested(directoryPath, {
|
|
60
|
-
...optionsReal,
|
|
61
|
-
controller,
|
|
62
|
-
});
|
|
63
|
-
const { progress, target } = data;
|
|
64
|
-
const dataRoot = {
|
|
65
|
-
progress,
|
|
66
|
-
tree: target,
|
|
67
|
-
};
|
|
68
|
-
controller.emit('end', dataRoot);
|
|
69
|
-
return dataRoot;
|
|
70
|
-
};
|
|
71
|
-
return controller;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Get the {@link Directory} instance from a file path list. Paths should be relative.
|
|
75
|
-
*/
|
|
76
|
-
static from(pathList, cwd = process.cwd()) {
|
|
77
|
-
const tree = new Directory(undefined, '.', cwd, new Map());
|
|
78
|
-
for (const path of pathList) {
|
|
79
|
-
const entryNameList = path.toString().split(/[\\/]/);
|
|
80
|
-
entryNameList.reduce((tree, entryName, index) => {
|
|
81
|
-
const absolutePath = join(tree.absolutePath, entryName);
|
|
82
|
-
const relativePath = relative(cwd, absolutePath);
|
|
83
|
-
if (index === entryNameList.length - 1) {
|
|
84
|
-
const file = new File(tree, relativePath, absolutePath);
|
|
85
|
-
tree.set(file.base, file);
|
|
86
|
-
return tree;
|
|
87
|
-
}
|
|
88
|
-
let directory = [...tree.children.values()].find(c => c instanceof Directory && c.absolutePath === absolutePath);
|
|
89
|
-
if (directory === undefined) {
|
|
90
|
-
directory = new Directory(tree, relativePath, absolutePath, new Map());
|
|
91
|
-
tree.set(`${directory.base}/`, directory);
|
|
92
|
-
}
|
|
93
|
-
return directory;
|
|
94
|
-
}, tree);
|
|
95
|
-
}
|
|
96
|
-
return tree;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Get deep iterator for the directory.
|
|
100
|
-
*/
|
|
101
|
-
static deepIterator = function* (directory, instanceOf) {
|
|
102
|
-
const subDirectories = [];
|
|
103
|
-
for (const element of directory.children.values()) {
|
|
104
|
-
if (instanceOf === undefined || element instanceof instanceOf) {
|
|
105
|
-
yield element;
|
|
106
|
-
}
|
|
107
|
-
if (element instanceof Directory) {
|
|
108
|
-
subDirectories.push(element);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
for (const subDirectory of subDirectories) {
|
|
112
|
-
yield* Directory.deepIterator(subDirectory);
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
/**
|
|
116
|
-
* Read directories and files progressively.
|
|
117
|
-
* @internal This function should be wrapped by {@link deepStream}.
|
|
118
|
-
* @param directoryPath Relative path to the directory.
|
|
119
|
-
* @param options The reader options.
|
|
120
|
-
*/
|
|
121
|
-
static async deepStreamNested(directoryPath, options) {
|
|
122
|
-
const { modules, cwd, concurrency, parent } = options;
|
|
123
|
-
const controller = options.controller
|
|
124
|
-
?? new EventEmitter();
|
|
125
|
-
const progress = options.progress
|
|
126
|
-
?? await Directory.deepCount(directoryPath, options);
|
|
127
|
-
controller.emit('progress', progress);
|
|
128
|
-
const readdir = modules.fs.promises.readdir ?? FSP.readdir;
|
|
129
|
-
const absolutePath = modules.path.join(cwd, String(directoryPath));
|
|
130
|
-
const relativePath = modules.path.relative(cwd, absolutePath);
|
|
131
|
-
const directory = new Directory(parent, relativePath, absolutePath, new Map());
|
|
132
|
-
const entryList = await readdir(absolutePath, { withFileTypes: true });
|
|
133
|
-
const promises = entryList.map(entry => async () => {
|
|
134
|
-
const parent = directory;
|
|
135
|
-
const absolutePath = modules.path.join(entry.parentPath, entry.name);
|
|
136
|
-
const relativePath = modules.path.relative(cwd, absolutePath);
|
|
137
|
-
if (entry.isDirectory() && !entry.isSymbolicLink()) {
|
|
138
|
-
const data = await Directory.deepStreamNested(relativePath, {
|
|
139
|
-
...options,
|
|
140
|
-
controller,
|
|
141
|
-
progress,
|
|
142
|
-
parent,
|
|
143
|
-
});
|
|
144
|
-
++progress.current;
|
|
145
|
-
controller.emit('progress', progress);
|
|
146
|
-
directory.children.set(`${data.target.base}/`, data.target);
|
|
147
|
-
return data;
|
|
148
|
-
}
|
|
149
|
-
const file = new File(parent, relativePath, absolutePath);
|
|
150
|
-
const data = { target: file, progress };
|
|
151
|
-
directory.children.set(`${file.base}`, file);
|
|
152
|
-
++progress.current;
|
|
153
|
-
controller.emit('progress', progress);
|
|
154
|
-
controller.emit('data', data);
|
|
155
|
-
return data;
|
|
156
|
-
});
|
|
157
|
-
await conc(promises, concurrency);
|
|
158
|
-
const data = { target: directory, progress };
|
|
159
|
-
controller.emit('progress', progress);
|
|
160
|
-
controller.emit('data', data);
|
|
161
|
-
return data;
|
|
162
|
-
}
|
|
163
|
-
base;
|
|
164
|
-
dir;
|
|
165
|
-
ext;
|
|
166
|
-
name;
|
|
167
|
-
root;
|
|
168
|
-
constructor(
|
|
169
|
-
/**
|
|
170
|
-
* The parent of the directory.
|
|
171
|
-
*/
|
|
172
|
-
parent,
|
|
173
|
-
/**
|
|
174
|
-
* The relative path to the directory.
|
|
175
|
-
*/
|
|
176
|
-
relativePath,
|
|
177
|
-
/**
|
|
178
|
-
* The absolute path to the file.
|
|
179
|
-
*/
|
|
180
|
-
absolutePath,
|
|
181
|
-
/**
|
|
182
|
-
* The content of the directory. It is a Map for performance reasons: you can find any file or folder without a loop if you know the name.
|
|
183
|
-
*
|
|
184
|
-
* Keys: {@link File.base} or {@link Directory.base}. Directory base ends with '/'.
|
|
185
|
-
*
|
|
186
|
-
* Values: {@link File} or {@link Directory} itself.
|
|
187
|
-
*/
|
|
188
|
-
children) {
|
|
189
|
-
this.parent = parent;
|
|
190
|
-
this.relativePath = relativePath;
|
|
191
|
-
this.absolutePath = absolutePath;
|
|
192
|
-
this.children = children;
|
|
193
|
-
const parsed = parse(absolutePath);
|
|
194
|
-
this.base = parsed.base;
|
|
195
|
-
this.dir = parsed.dir;
|
|
196
|
-
this.ext = parsed.ext;
|
|
197
|
-
this.name = parsed.name;
|
|
198
|
-
this.root = parsed.root;
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* @param instanceOf Optionally filter children by type.
|
|
202
|
-
*/
|
|
203
|
-
deepIterator(instanceOf) {
|
|
204
|
-
return Directory.deepIterator(this, instanceOf);
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* @param instanceOf Optionally filter children by type.
|
|
208
|
-
*/
|
|
209
|
-
deep(instanceOf) {
|
|
210
|
-
return [...Directory.deepIterator(this, instanceOf)];
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* @returns The relative path to the directory.
|
|
214
|
-
*/
|
|
215
|
-
toString() {
|
|
216
|
-
return this.relativePath;
|
|
217
|
-
}
|
|
218
|
-
get(key) {
|
|
219
|
-
return this.children.get(key);
|
|
220
|
-
}
|
|
221
|
-
set(key, value) {
|
|
222
|
-
return this.children.set(key, value);
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* @returns The cache for each file of the directory with last time edited number.
|
|
226
|
-
* @see {@link modified}.
|
|
227
|
-
*/
|
|
228
|
-
async deepModifiedTime(out, realOptions) {
|
|
229
|
-
const { concurrency = configDefault.concurrency, modules } = realOptions;
|
|
230
|
-
const promises = [];
|
|
231
|
-
for (const entry of this.deepIterator()) {
|
|
232
|
-
if (entry instanceof Directory) {
|
|
233
|
-
continue;
|
|
234
|
-
}
|
|
235
|
-
promises.push(async () => {
|
|
236
|
-
const fileStat = await modules.fs.promises.stat(entry.absolutePath);
|
|
237
|
-
out.set(entry, fileStat.mtime.getTime());
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
await conc(promises, concurrency);
|
|
241
|
-
return out;
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
//# sourceMappingURL=directory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"directory.js","sourceRoot":"","sources":["../../../src/browser/fs/directory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAmB,QAAQ,EAAE,MAAM,WAAW,CAAA;AAClE,OAAO,YAAY,MAAM,aAAa,CAAA;AACtC,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAA;AACvC,OAAO,OAAO,MAAM,cAAc,CAAA;AAClC,OAAO,EAAwB,MAAM,WAAW,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AA+DjC;;GAEG;AACH,MAAM,OAAO,SAAS;IA0NF;IAIA;IAIA;IAQA;IAzOlB;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,SAAS,CACpB,aAAqC,EACrC,OAAyB;QAEzB,MAAM,EACJ,OAAO,EACP,GAAG,EACH,WAAW,EACX,QAAQ,GAAG;YACT,OAAO,EAAE,CAAC;YACV,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,CAAC;Y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QAEhD,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IACtC,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,gBAAgB,CACpB,GAAsB,EACtB,WAAoC;QAEpC,MAAM,EAAE,WAAW,GAAG,aAAa,CAAC,WAAW,EAAE,OAAO,EAAE,GAAG,WAAW,CAAA;QACxE,MAAM,QAAQ,GAA4B,EAAE,CAAA;QAC5C,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,YAAY,EAAE,EAAE,CAAC;YACxC,IAAI,KAAK,YAAY,SAAS,EAAE,CAAC;gBAC/B,SAAQ;YACV,CAAC;YAED,QAAQ,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE;gBACvB,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;gBACnE,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAA;YAC1C,CAAC,CAAC,CAAA;QACJ,CAAC;QAED,MAAM,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAA;QACjC,OAAO,GAAG,CAAA;IACZ,CAAC"}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { type ChalkInstance } from 'chalk';
|
|
2
|
-
import { type DecorName } from '../styling.js';
|
|
3
|
-
import { type FilterName } from '../filtering.js';
|
|
4
|
-
import { File } from './file.js';
|
|
5
|
-
import { type SourceInfo } from './source-info.js';
|
|
6
|
-
import { type Directory } from './directory.js';
|
|
7
|
-
/**
|
|
8
|
-
* @see {@link FileInfo.prototype.toString}
|
|
9
|
-
*/
|
|
10
|
-
export type FileInfoToStringOptions = {
|
|
11
|
-
/**
|
|
12
|
-
* On posix systems, this has no effect. But, on Windows, it means that
|
|
13
|
-
* paths will be `/` delimited, and absolute paths will be their full
|
|
14
|
-
* resolved UNC forms, eg instead of `'C:\\foo\\bar'`, it would return
|
|
15
|
-
* `'//?/C:/foo/bar'`
|
|
16
|
-
* @default false
|
|
17
|
-
* @returns `/` delimited paths, even on Windows.
|
|
18
|
-
*/
|
|
19
|
-
posix?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* The appearance behavior of the file icon.
|
|
22
|
-
* @default undefined
|
|
23
|
-
*/
|
|
24
|
-
fileIcon?: DecorName;
|
|
25
|
-
/**
|
|
26
|
-
* Show the scanner's source after the file path.
|
|
27
|
-
* @default false
|
|
28
|
-
*/
|
|
29
|
-
source?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* The appearance behavior of the prefix.
|
|
32
|
-
* `"+"` for included, `"!"` for excluded.
|
|
33
|
-
* @default false
|
|
34
|
-
*/
|
|
35
|
-
usePrefix?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* The behavior of colors.
|
|
38
|
-
* @default undefined
|
|
39
|
-
*/
|
|
40
|
-
chalk?: ChalkInstance;
|
|
41
|
-
/**
|
|
42
|
-
* Determines if the path's base or the entire path should be formatted.
|
|
43
|
-
* @default true
|
|
44
|
-
*/
|
|
45
|
-
entire?: boolean;
|
|
46
|
-
};
|
|
47
|
-
export type FileInfoStatus = 'ignored' | 'included' | 'non-target';
|
|
48
|
-
/**
|
|
49
|
-
* The result of the file path scan.
|
|
50
|
-
*/
|
|
51
|
-
export declare class FileInfo extends File {
|
|
52
|
-
/**
|
|
53
|
-
* The source of patterns.
|
|
54
|
-
*/
|
|
55
|
-
readonly source?: SourceInfo | undefined;
|
|
56
|
-
static from(file: File, source?: SourceInfo): FileInfo;
|
|
57
|
-
/**
|
|
58
|
-
* Determines if ignored file is ignored or not.
|
|
59
|
-
*/
|
|
60
|
-
readonly status: FileInfoStatus;
|
|
61
|
-
constructor(
|
|
62
|
-
/**
|
|
63
|
-
* The parent of the file.
|
|
64
|
-
*/
|
|
65
|
-
parent: Directory,
|
|
66
|
-
/**
|
|
67
|
-
* The relative path to the file.
|
|
68
|
-
*/
|
|
69
|
-
relativePath: string,
|
|
70
|
-
/**
|
|
71
|
-
* The absolute path to the file.
|
|
72
|
-
*/
|
|
73
|
-
absolutePath: string,
|
|
74
|
-
/**
|
|
75
|
-
* The source of patterns.
|
|
76
|
-
*/
|
|
77
|
-
source?: SourceInfo | undefined);
|
|
78
|
-
/**
|
|
79
|
-
* @param options Styling options.
|
|
80
|
-
* @returns Relative file path. Optionally formatted.
|
|
81
|
-
*/
|
|
82
|
-
toString(options?: FileInfoToStringOptions): string;
|
|
83
|
-
/**
|
|
84
|
-
* @param filter The group name. Default: `"all"`
|
|
85
|
-
* @returns `true`, if the file is contained by the filter.
|
|
86
|
-
*/
|
|
87
|
-
isIncludedBy(filter?: FilterName | ((fileInfo: FileInfo) => boolean)): boolean;
|
|
88
|
-
}
|
|
89
|
-
//# sourceMappingURL=file-info.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-info.d.ts","sourceRoot":"","sources":["../../../src/browser/fs/file-info.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAA;AAE1C,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;;OAGG;IACH,KAAK,CAAC,EAAE,aAAa,CAAA;IAErB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,UAAU,GAAG,YAAY,CAAA;AAElE;;GAEG;AACH,qBAAa,QAAS,SAAQ,IAAI;IA4B9B;;OAEG;aACa,MAAM,CAAC,EAAE,UAAU;IA9BrC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,UAAU;IAS3C;;OAEG;IACH,SAAgB,MAAM,EAAE,cAAc,CAAA;;IAGpC;;OAEG;IACH,MAAM,EAAE,SAAS;IACjB;;OAEG;IACH,YAAY,EAAE,MAAM;IACpB;;OAEG;IACH,YAAY,EAAE,MAAM;IACpB;;OAEG;IACa,MAAM,CAAC,EAAE,UAAU,YAAA;IAQrC;;;OAGG;IACM,QAAQ,CAAC,OAAO,CAAC,EAAE,uBAAuB,GAAG,MAAM;IAiD5D;;;OAGG;IACH,YAAY,CACV,MAAM,CAAC,EAAE,UAAU,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,KAAK,OAAO,CAAC,GACtD,OAAO;CAYX"}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import PATH from 'node:path';
|
|
2
|
-
import {} from 'chalk';
|
|
3
|
-
import * as nf from '@m234/nerd-fonts';
|
|
4
|
-
import { decorCondition } from '../styling.js';
|
|
5
|
-
import {} from '../filtering.js';
|
|
6
|
-
import { File } from './file.js';
|
|
7
|
-
import {} from './source-info.js';
|
|
8
|
-
import {} from './directory.js';
|
|
9
|
-
/**
|
|
10
|
-
* The result of the file path scan.
|
|
11
|
-
*/
|
|
12
|
-
export class FileInfo extends File {
|
|
13
|
-
source;
|
|
14
|
-
static from(file, source) {
|
|
15
|
-
return new FileInfo(file.parent, file.relativePath, file.absolutePath, source);
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Determines if ignored file is ignored or not.
|
|
19
|
-
*/
|
|
20
|
-
status;
|
|
21
|
-
constructor(
|
|
22
|
-
/**
|
|
23
|
-
* The parent of the file.
|
|
24
|
-
*/
|
|
25
|
-
parent,
|
|
26
|
-
/**
|
|
27
|
-
* The relative path to the file.
|
|
28
|
-
*/
|
|
29
|
-
relativePath,
|
|
30
|
-
/**
|
|
31
|
-
* The absolute path to the file.
|
|
32
|
-
*/
|
|
33
|
-
absolutePath,
|
|
34
|
-
/**
|
|
35
|
-
* The source of patterns.
|
|
36
|
-
*/
|
|
37
|
-
source) {
|
|
38
|
-
super(parent, relativePath, absolutePath);
|
|
39
|
-
this.source = source;
|
|
40
|
-
this.status = source === undefined
|
|
41
|
-
? 'non-target'
|
|
42
|
-
: (source.scanner.ignores(relativePath) ? 'ignored' : 'included');
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* @param options Styling options.
|
|
46
|
-
* @returns Relative file path. Optionally formatted.
|
|
47
|
-
*/
|
|
48
|
-
toString(options) {
|
|
49
|
-
const { fileIcon, chalk, usePrefix = false, source: useSource = false, entire = true, posix = false, } = options ?? {};
|
|
50
|
-
const patha = posix ? PATH.posix : PATH;
|
|
51
|
-
const parsed = PATH.parse(this.relativePath);
|
|
52
|
-
const glyph = nf.Seti.fromPath(parsed);
|
|
53
|
-
const fIcon = fileIcon
|
|
54
|
-
? decorCondition(fileIcon, {
|
|
55
|
-
ifEmoji: '📄',
|
|
56
|
-
ifNerd: chalk && glyph.color !== undefined
|
|
57
|
-
? chalk.hex(glyph.color)(glyph.value)
|
|
58
|
-
: glyph.value,
|
|
59
|
-
postfix: ' ',
|
|
60
|
-
})
|
|
61
|
-
: '';
|
|
62
|
-
let prefix = usePrefix && this.status !== 'non-target'
|
|
63
|
-
? (this.status === 'ignored' ? '!' : '+')
|
|
64
|
-
: '';
|
|
65
|
-
let postfix = useSource && this.source !== undefined
|
|
66
|
-
? ' < ' + this.source.toString()
|
|
67
|
-
: '';
|
|
68
|
-
if (chalk) {
|
|
69
|
-
prefix = chalk.dim(prefix);
|
|
70
|
-
postfix = chalk.dim(postfix);
|
|
71
|
-
const clr = this.status === 'non-target'
|
|
72
|
-
? chalk.white
|
|
73
|
-
: (this.status === 'included' ? chalk.green : chalk.white);
|
|
74
|
-
if (entire) {
|
|
75
|
-
return fIcon + clr(prefix + this.relativePath + postfix);
|
|
76
|
-
}
|
|
77
|
-
return parsed.dir + patha.sep + fIcon
|
|
78
|
-
+ clr(prefix + parsed.base + postfix);
|
|
79
|
-
}
|
|
80
|
-
if (entire) {
|
|
81
|
-
return prefix + this.relativePath + postfix;
|
|
82
|
-
}
|
|
83
|
-
return parsed.dir + patha.sep + fIcon + prefix + parsed.base + postfix;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* @param filter The group name. Default: `"all"`
|
|
87
|
-
* @returns `true`, if the file is contained by the filter.
|
|
88
|
-
*/
|
|
89
|
-
isIncludedBy(filter) {
|
|
90
|
-
if (typeof filter === 'function') {
|
|
91
|
-
return filter(this);
|
|
92
|
-
}
|
|
93
|
-
filter ??= 'all';
|
|
94
|
-
const filterIgnore = (filter === 'ignored') && this.status === 'ignored';
|
|
95
|
-
const filterInclude = (filter === 'included') && this.status === 'included';
|
|
96
|
-
const filterAll = filter === 'all';
|
|
97
|
-
const result = filterIgnore || filterInclude || filterAll;
|
|
98
|
-
return result;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
//# sourceMappingURL=file-info.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-info.js","sourceRoot":"","sources":["../../../src/browser/fs/file-info.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAsB,MAAM,OAAO,CAAA;AAC1C,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAE,cAAc,EAAkB,MAAM,eAAe,CAAA;AAC9D,OAAO,EAAmB,MAAM,iBAAiB,C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MAAM,GAAG,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,CAAA;YAC1D,CAAC;YAED,OAAO,MAAM,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,KAAK;kBACjC,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC,CAAA;QACzC,CAAC;QAED,IAAI,MAAM,EAAE,CAAC;YACX,OAAO,MAAM,GAAG,IAAI,CAAC,YAAY,GAAG,OAAO,CAAA;QAC7C,CAAC;QAED,OAAO,MAAM,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC,IAAI,GAAG,OAAO,CAAA;IACxE,CAAC;IAED;;;OAGG;IACH,YAAY,CACV,MAAuD;QAEvD,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE,CAAC;YACjC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAA;QACrB,CAAC;QAED,MAAM,KAAK,KAAK,CAAA;QAChB,MAAM,YAAY,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,CAAA;QACxE,MAAM,aAAa,GAAG,CAAC,MAAM,KAAK,UAAU,CAAC,IAAI,IAAI,CAAC,MAAM,KAAK,UAAU,CAAA;QAC3E,MAAM,SAAS,GAAG,MAAM,KAAK,KAAK,CAAA;QAClC,MAAM,MAAM,GAAG,YAAY,IAAI,aAAa,IAAI,SAAS,CAAA;QACzD,OAAO,MAAM,CAAA;IACf,CAAC;CACF"}
|
package/out/browser/fs/file.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { type ParsedPath } from 'node:path';
|
|
2
|
-
import { type Directory } from './directory.js';
|
|
3
|
-
export declare class File implements ParsedPath {
|
|
4
|
-
/**
|
|
5
|
-
* The parent of the file.
|
|
6
|
-
*/
|
|
7
|
-
readonly parent: Directory;
|
|
8
|
-
/**
|
|
9
|
-
* The relative path to the file.
|
|
10
|
-
*/
|
|
11
|
-
readonly relativePath: string;
|
|
12
|
-
/**
|
|
13
|
-
* The absolute path to the file.
|
|
14
|
-
*/
|
|
15
|
-
readonly absolutePath: string;
|
|
16
|
-
readonly base: string;
|
|
17
|
-
readonly dir: string;
|
|
18
|
-
readonly ext: string;
|
|
19
|
-
readonly name: string;
|
|
20
|
-
readonly root: string;
|
|
21
|
-
constructor(
|
|
22
|
-
/**
|
|
23
|
-
* The parent of the file.
|
|
24
|
-
*/
|
|
25
|
-
parent: Directory,
|
|
26
|
-
/**
|
|
27
|
-
* The relative path to the file.
|
|
28
|
-
*/
|
|
29
|
-
relativePath: string,
|
|
30
|
-
/**
|
|
31
|
-
* The absolute path to the file.
|
|
32
|
-
*/
|
|
33
|
-
absolutePath: string);
|
|
34
|
-
/**
|
|
35
|
-
* @returns The relative path to the file.
|
|
36
|
-
*/
|
|
37
|
-
toString(): string;
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=file.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../src/browser/fs/file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,WAAW,CAAA;AAClD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,qBAAa,IAAK,YAAW,UAAU;IAOnC;;OAEG;aACa,MAAM,EAAE,SAAS;IACjC;;OAEG;aACa,YAAY,EAAE,MAAM;IACpC;;OAEG;aACa,YAAY,EAAE,MAAM;IAjBtC,SAAgB,IAAI,EAAE,MAAM,CAAA;IAC5B,SAAgB,GAAG,EAAE,MAAM,CAAA;IAC3B,SAAgB,GAAG,EAAE,MAAM,CAAA;IAC3B,SAAgB,IAAI,EAAE,MAAM,CAAA;IAC5B,SAAgB,IAAI,EAAE,MAAM,CAAA;;IAE1B;;OAEG;IACa,MAAM,EAAE,SAAS;IACjC;;OAEG;IACa,YAAY,EAAE,MAAM;IACpC;;OAEG;IACa,YAAY,EAAE,MAAM;IAUtC;;OAEG;IACH,QAAQ,IAAI,MAAM;CAGnB"}
|