Skip to content

Commit

Permalink
improve FileSystem
Browse files Browse the repository at this point in the history
  • Loading branch information
Gorniaky committed Mar 25, 2024
1 parent 7bb4de8 commit 16f7966
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/util/FileSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export interface FileSystemOptions {
export class FileSystem {
declare readonly ignoreFile?: string;
readonly ignoreList = new Set(ALL_BLOCKED_FILES);
ignorePattern: string = ALL_BLOCKED_FILES_IGNORE_PATTERN;
readonly patterns = new Set("**");
found: Uri[] = [];

Expand All @@ -36,10 +35,13 @@ export class FileSystem {
for (const ignore of options.ignoreList) {
this.ignoreList.add(ignore);
}
this.ignorePattern = `{${Array.from(this.ignoreList).join(",")}}`;
}
}

get ignorePattern() {
return `{${Array.from(this.ignoreList).join(",")}}`;
}

async findFiles(readSelectedPath = false) {
await this.#findIgnoreFile();
if (readSelectedPath)
Expand All @@ -64,8 +66,6 @@ export class FileSystem {
for (const pattern of patterns) {
this.ignoreList.add(pattern);
}

this.ignorePattern = `{${Array.from(this.ignoreList).join(",")}}`;
}

async #readSelectedPath() {
Expand Down

0 comments on commit 16f7966

Please sign in to comment.