@bemoje/fs 0.4.1 → 1.0.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 +116 -20
- package/index.d.ts +113 -0
- package/index.mjs +168 -0
- package/package.json +24 -19
- package/LICENSE +0 -21
- package/cjs/index.d.ts +0 -82
- package/cjs/index.d.ts.map +0 -1
- package/cjs/index.js +0 -85
- package/cjs/index.js.map +0 -1
- package/cjs/lib/FSPathFilter.d.ts +0 -84
- package/cjs/lib/FSPathFilter.d.ts.map +0 -1
- package/cjs/lib/FSPathFilter.js +0 -174
- package/cjs/lib/FSPathFilter.js.map +0 -1
- package/cjs/lib/appendFile.d.ts +0 -10
- package/cjs/lib/appendFile.d.ts.map +0 -1
- package/cjs/lib/appendFile.js +0 -23
- package/cjs/lib/appendFile.js.map +0 -1
- package/cjs/lib/appendFileLine.d.ts +0 -7
- package/cjs/lib/appendFileLine.d.ts.map +0 -1
- package/cjs/lib/appendFileLine.js +0 -16
- package/cjs/lib/appendFileLine.js.map +0 -1
- package/cjs/lib/appendFileLineSync.d.ts +0 -7
- package/cjs/lib/appendFileLineSync.d.ts.map +0 -1
- package/cjs/lib/appendFileLineSync.js +0 -16
- package/cjs/lib/appendFileLineSync.js.map +0 -1
- package/cjs/lib/appendFileSync.d.ts +0 -10
- package/cjs/lib/appendFileSync.d.ts.map +0 -1
- package/cjs/lib/appendFileSync.js +0 -23
- package/cjs/lib/appendFileSync.js.map +0 -1
- package/cjs/lib/createDirectory.d.ts +0 -9
- package/cjs/lib/createDirectory.d.ts.map +0 -1
- package/cjs/lib/createDirectory.js +0 -18
- package/cjs/lib/createDirectory.js.map +0 -1
- package/cjs/lib/createDirectorySync.d.ts +0 -8
- package/cjs/lib/createDirectorySync.d.ts.map +0 -1
- package/cjs/lib/createDirectorySync.js +0 -17
- package/cjs/lib/createDirectorySync.js.map +0 -1
- package/cjs/lib/emptyDirectory.d.ts +0 -17
- package/cjs/lib/emptyDirectory.d.ts.map +0 -1
- package/cjs/lib/emptyDirectory.js +0 -26
- package/cjs/lib/emptyDirectory.js.map +0 -1
- package/cjs/lib/emptyDirectorySync.d.ts +0 -17
- package/cjs/lib/emptyDirectorySync.d.ts.map +0 -1
- package/cjs/lib/emptyDirectorySync.js +0 -29
- package/cjs/lib/emptyDirectorySync.js.map +0 -1
- package/cjs/lib/getJsonIndentation.d.ts +0 -7
- package/cjs/lib/getJsonIndentation.d.ts.map +0 -1
- package/cjs/lib/getJsonIndentation.js +0 -17
- package/cjs/lib/getJsonIndentation.js.map +0 -1
- package/cjs/lib/getLastMofifiedFileIn.d.ts +0 -2
- package/cjs/lib/getLastMofifiedFileIn.d.ts.map +0 -1
- package/cjs/lib/getLastMofifiedFileIn.js +0 -20
- package/cjs/lib/getLastMofifiedFileIn.js.map +0 -1
- package/cjs/lib/promptUserEditInTextEditor.d.ts +0 -10
- package/cjs/lib/promptUserEditInTextEditor.d.ts.map +0 -1
- package/cjs/lib/promptUserEditInTextEditor.js +0 -30
- package/cjs/lib/promptUserEditInTextEditor.js.map +0 -1
- package/cjs/lib/promptUserEditInTextEditorSync.d.ts +0 -10
- package/cjs/lib/promptUserEditInTextEditorSync.d.ts.map +0 -1
- package/cjs/lib/promptUserEditInTextEditorSync.js +0 -27
- package/cjs/lib/promptUserEditInTextEditorSync.js.map +0 -1
- package/cjs/lib/promptUserEditJsonInTextEditor.d.ts +0 -13
- package/cjs/lib/promptUserEditJsonInTextEditor.d.ts.map +0 -1
- package/cjs/lib/promptUserEditJsonInTextEditor.js +0 -25
- package/cjs/lib/promptUserEditJsonInTextEditor.js.map +0 -1
- package/cjs/lib/promptUserEditJsonInTextEditorSync.d.ts +0 -13
- package/cjs/lib/promptUserEditJsonInTextEditorSync.d.ts.map +0 -1
- package/cjs/lib/promptUserEditJsonInTextEditorSync.js +0 -25
- package/cjs/lib/promptUserEditJsonInTextEditorSync.js.map +0 -1
- package/cjs/lib/readDirectoryDirents.d.ts +0 -11
- package/cjs/lib/readDirectoryDirents.d.ts.map +0 -1
- package/cjs/lib/readDirectoryDirents.js +0 -17
- package/cjs/lib/readDirectoryDirents.js.map +0 -1
- package/cjs/lib/readDirectoryDirentsPaths.d.ts +0 -14
- package/cjs/lib/readDirectoryDirentsPaths.d.ts.map +0 -1
- package/cjs/lib/readDirectoryDirentsPaths.js +0 -27
- package/cjs/lib/readDirectoryDirentsPaths.js.map +0 -1
- package/cjs/lib/readDirectoryDirentsPathsSafe.d.ts +0 -15
- package/cjs/lib/readDirectoryDirentsPathsSafe.d.ts.map +0 -1
- package/cjs/lib/readDirectoryDirentsPathsSafe.js +0 -22
- package/cjs/lib/readDirectoryDirentsPathsSafe.js.map +0 -1
- package/cjs/lib/readDirectoryDirentsPathsSafeSync.d.ts +0 -15
- package/cjs/lib/readDirectoryDirentsPathsSafeSync.d.ts.map +0 -1
- package/cjs/lib/readDirectoryDirentsPathsSafeSync.js +0 -22
- package/cjs/lib/readDirectoryDirentsPathsSafeSync.js.map +0 -1
- package/cjs/lib/readDirectoryDirentsPathsSync.d.ts +0 -14
- package/cjs/lib/readDirectoryDirentsPathsSync.d.ts.map +0 -1
- package/cjs/lib/readDirectoryDirentsPathsSync.js +0 -27
- package/cjs/lib/readDirectoryDirentsPathsSync.js.map +0 -1
- package/cjs/lib/readDirectoryDirentsSafe.d.ts +0 -12
- package/cjs/lib/readDirectoryDirentsSafe.d.ts.map +0 -1
- package/cjs/lib/readDirectoryDirentsSafe.js +0 -20
- package/cjs/lib/readDirectoryDirentsSafe.js.map +0 -1
- package/cjs/lib/readDirectoryDirentsSafeSync.d.ts +0 -12
- package/cjs/lib/readDirectoryDirentsSafeSync.d.ts.map +0 -1
- package/cjs/lib/readDirectoryDirentsSafeSync.js +0 -20
- package/cjs/lib/readDirectoryDirentsSafeSync.js.map +0 -1
- package/cjs/lib/readDirectoryDirentsSync.d.ts +0 -11
- package/cjs/lib/readDirectoryDirentsSync.d.ts.map +0 -1
- package/cjs/lib/readDirectoryDirentsSync.js +0 -17
- package/cjs/lib/readDirectoryDirentsSync.js.map +0 -1
- package/cjs/lib/readDirectoryNames.d.ts +0 -7
- package/cjs/lib/readDirectoryNames.d.ts.map +0 -1
- package/cjs/lib/readDirectoryNames.js +0 -15
- package/cjs/lib/readDirectoryNames.js.map +0 -1
- package/cjs/lib/readDirectoryNamesPaths.d.ts +0 -11
- package/cjs/lib/readDirectoryNamesPaths.d.ts.map +0 -1
- package/cjs/lib/readDirectoryNamesPaths.js +0 -24
- package/cjs/lib/readDirectoryNamesPaths.js.map +0 -1
- package/cjs/lib/readDirectoryNamesPathsSafe.d.ts +0 -12
- package/cjs/lib/readDirectoryNamesPathsSafe.d.ts.map +0 -1
- package/cjs/lib/readDirectoryNamesPathsSafe.js +0 -20
- package/cjs/lib/readDirectoryNamesPathsSafe.js.map +0 -1
- package/cjs/lib/readDirectoryNamesPathsSafeSync.d.ts +0 -12
- package/cjs/lib/readDirectoryNamesPathsSafeSync.d.ts.map +0 -1
- package/cjs/lib/readDirectoryNamesPathsSafeSync.js +0 -20
- package/cjs/lib/readDirectoryNamesPathsSafeSync.js.map +0 -1
- package/cjs/lib/readDirectoryNamesPathsSync.d.ts +0 -11
- package/cjs/lib/readDirectoryNamesPathsSync.d.ts.map +0 -1
- package/cjs/lib/readDirectoryNamesPathsSync.js +0 -24
- package/cjs/lib/readDirectoryNamesPathsSync.js.map +0 -1
- package/cjs/lib/readDirectoryNamesSafe.d.ts +0 -8
- package/cjs/lib/readDirectoryNamesSafe.d.ts.map +0 -1
- package/cjs/lib/readDirectoryNamesSafe.js +0 -18
- package/cjs/lib/readDirectoryNamesSafe.js.map +0 -1
- package/cjs/lib/readDirectoryNamesSafeSync.d.ts +0 -8
- package/cjs/lib/readDirectoryNamesSafeSync.d.ts.map +0 -1
- package/cjs/lib/readDirectoryNamesSafeSync.js +0 -18
- package/cjs/lib/readDirectoryNamesSafeSync.js.map +0 -1
- package/cjs/lib/readDirectoryNamesSync.d.ts +0 -7
- package/cjs/lib/readDirectoryNamesSync.d.ts.map +0 -1
- package/cjs/lib/readDirectoryNamesSync.js +0 -15
- package/cjs/lib/readDirectoryNamesSync.js.map +0 -1
- package/cjs/lib/readDirectoryPaths.d.ts +0 -7
- package/cjs/lib/readDirectoryPaths.d.ts.map +0 -1
- package/cjs/lib/readDirectoryPaths.js +0 -18
- package/cjs/lib/readDirectoryPaths.js.map +0 -1
- package/cjs/lib/readDirectoryPathsSafe.d.ts +0 -8
- package/cjs/lib/readDirectoryPathsSafe.d.ts.map +0 -1
- package/cjs/lib/readDirectoryPathsSafe.js +0 -19
- package/cjs/lib/readDirectoryPathsSafe.js.map +0 -1
- package/cjs/lib/readDirectoryPathsSafeSync.d.ts +0 -8
- package/cjs/lib/readDirectoryPathsSafeSync.d.ts.map +0 -1
- package/cjs/lib/readDirectoryPathsSafeSync.js +0 -19
- package/cjs/lib/readDirectoryPathsSafeSync.js.map +0 -1
- package/cjs/lib/readDirectoryPathsSync.d.ts +0 -7
- package/cjs/lib/readDirectoryPathsSync.d.ts.map +0 -1
- package/cjs/lib/readDirectoryPathsSync.js +0 -18
- package/cjs/lib/readDirectoryPathsSync.js.map +0 -1
- package/cjs/lib/readDirectoryStats.d.ts +0 -13
- package/cjs/lib/readDirectoryStats.d.ts.map +0 -1
- package/cjs/lib/readDirectoryStats.js +0 -33
- package/cjs/lib/readDirectoryStats.js.map +0 -1
- package/cjs/lib/readDirectoryStatsSafe.d.ts +0 -14
- package/cjs/lib/readDirectoryStatsSafe.d.ts.map +0 -1
- package/cjs/lib/readDirectoryStatsSafe.js +0 -20
- package/cjs/lib/readDirectoryStatsSafe.js.map +0 -1
- package/cjs/lib/readDirectoryStatsSafeSync.d.ts +0 -14
- package/cjs/lib/readDirectoryStatsSafeSync.d.ts.map +0 -1
- package/cjs/lib/readDirectoryStatsSafeSync.js +0 -20
- package/cjs/lib/readDirectoryStatsSafeSync.js.map +0 -1
- package/cjs/lib/readDirectoryStatsSync.d.ts +0 -13
- package/cjs/lib/readDirectoryStatsSync.d.ts.map +0 -1
- package/cjs/lib/readDirectoryStatsSync.js +0 -32
- package/cjs/lib/readDirectoryStatsSync.js.map +0 -1
- package/cjs/lib/readFile.d.ts +0 -22
- package/cjs/lib/readFile.d.ts.map +0 -1
- package/cjs/lib/readFile.js +0 -21
- package/cjs/lib/readFile.js.map +0 -1
- package/cjs/lib/readFileBuffer.d.ts +0 -20
- package/cjs/lib/readFileBuffer.d.ts.map +0 -1
- package/cjs/lib/readFileBuffer.js +0 -20
- package/cjs/lib/readFileBuffer.js.map +0 -1
- package/cjs/lib/readFileBufferSafe.d.ts +0 -12
- package/cjs/lib/readFileBufferSafe.d.ts.map +0 -1
- package/cjs/lib/readFileBufferSafe.js +0 -24
- package/cjs/lib/readFileBufferSafe.js.map +0 -1
- package/cjs/lib/readFileBufferSafeSync.d.ts +0 -12
- package/cjs/lib/readFileBufferSafeSync.d.ts.map +0 -1
- package/cjs/lib/readFileBufferSafeSync.js +0 -24
- package/cjs/lib/readFileBufferSafeSync.js.map +0 -1
- package/cjs/lib/readFileBufferSync.d.ts +0 -10
- package/cjs/lib/readFileBufferSync.d.ts.map +0 -1
- package/cjs/lib/readFileBufferSync.js +0 -17
- package/cjs/lib/readFileBufferSync.js.map +0 -1
- package/cjs/lib/readFileFirstLine.d.ts +0 -5
- package/cjs/lib/readFileFirstLine.d.ts.map +0 -1
- package/cjs/lib/readFileFirstLine.js +0 -21
- package/cjs/lib/readFileFirstLine.js.map +0 -1
- package/cjs/lib/readFileSafe.d.ts +0 -14
- package/cjs/lib/readFileSafe.d.ts.map +0 -1
- package/cjs/lib/readFileSafe.js +0 -26
- package/cjs/lib/readFileSafe.js.map +0 -1
- package/cjs/lib/readFileSafeSync.d.ts +0 -14
- package/cjs/lib/readFileSafeSync.d.ts.map +0 -1
- package/cjs/lib/readFileSafeSync.js +0 -26
- package/cjs/lib/readFileSafeSync.js.map +0 -1
- package/cjs/lib/readFileSync.d.ts +0 -11
- package/cjs/lib/readFileSync.d.ts.map +0 -1
- package/cjs/lib/readFileSync.js +0 -18
- package/cjs/lib/readFileSync.js.map +0 -1
- package/cjs/lib/readJsonFile.d.ts +0 -2
- package/cjs/lib/readJsonFile.d.ts.map +0 -1
- package/cjs/lib/readJsonFile.js +0 -6
- package/cjs/lib/readJsonFile.js.map +0 -1
- package/cjs/lib/readJsonFileSafe.d.ts +0 -10
- package/cjs/lib/readJsonFileSafe.d.ts.map +0 -1
- package/cjs/lib/readJsonFileSafe.js +0 -22
- package/cjs/lib/readJsonFileSafe.js.map +0 -1
- package/cjs/lib/readJsonFileSafeSync.d.ts +0 -10
- package/cjs/lib/readJsonFileSafeSync.d.ts.map +0 -1
- package/cjs/lib/readJsonFileSafeSync.js +0 -22
- package/cjs/lib/readJsonFileSafeSync.js.map +0 -1
- package/cjs/lib/readJsonFileSync.d.ts +0 -2
- package/cjs/lib/readJsonFileSync.d.ts.map +0 -1
- package/cjs/lib/readJsonFileSync.js +0 -6
- package/cjs/lib/readJsonFileSync.js.map +0 -1
- package/cjs/lib/removeDirectory.d.ts +0 -2
- package/cjs/lib/removeDirectory.d.ts.map +0 -1
- package/cjs/lib/removeDirectory.js +0 -6
- package/cjs/lib/removeDirectory.js.map +0 -1
- package/cjs/lib/removeDirectorySync.d.ts +0 -2
- package/cjs/lib/removeDirectorySync.d.ts.map +0 -1
- package/cjs/lib/removeDirectorySync.js +0 -6
- package/cjs/lib/removeDirectorySync.js.map +0 -1
- package/cjs/lib/removeFile.d.ts +0 -2
- package/cjs/lib/removeFile.d.ts.map +0 -1
- package/cjs/lib/removeFile.js +0 -6
- package/cjs/lib/removeFile.js.map +0 -1
- package/cjs/lib/removeFileSync.d.ts +0 -2
- package/cjs/lib/removeFileSync.d.ts.map +0 -1
- package/cjs/lib/removeFileSync.js +0 -6
- package/cjs/lib/removeFileSync.js.map +0 -1
- package/cjs/lib/tempFile.d.ts +0 -7
- package/cjs/lib/tempFile.d.ts.map +0 -1
- package/cjs/lib/tempFile.js +0 -27
- package/cjs/lib/tempFile.js.map +0 -1
- package/cjs/lib/tempFileSync.d.ts +0 -7
- package/cjs/lib/tempFileSync.d.ts.map +0 -1
- package/cjs/lib/tempFileSync.js +0 -27
- package/cjs/lib/tempFileSync.js.map +0 -1
- package/cjs/lib/types/IGetUserInputFromEditorOptions.d.ts +0 -16
- package/cjs/lib/types/IGetUserInputFromEditorOptions.d.ts.map +0 -1
- package/cjs/lib/types/IGetUserInputFromEditorOptions.js +0 -3
- package/cjs/lib/types/IGetUserInputFromEditorOptions.js.map +0 -1
- package/cjs/lib/types/IJFReadOptions.d.ts +0 -2
- package/cjs/lib/types/IJFReadOptions.d.ts.map +0 -1
- package/cjs/lib/types/IJFReadOptions.js +0 -3
- package/cjs/lib/types/IJFReadOptions.js.map +0 -1
- package/cjs/lib/types/IJFWriteOptions.d.ts +0 -2
- package/cjs/lib/types/IJFWriteOptions.d.ts.map +0 -1
- package/cjs/lib/types/IJFWriteOptions.js +0 -3
- package/cjs/lib/types/IJFWriteOptions.js.map +0 -1
- package/cjs/lib/types/IJsonOutputOptions.d.ts +0 -2
- package/cjs/lib/types/IJsonOutputOptions.d.ts.map +0 -1
- package/cjs/lib/types/IJsonOutputOptions.js +0 -3
- package/cjs/lib/types/IJsonOutputOptions.js.map +0 -1
- package/cjs/lib/types/ILogFileData.d.ts +0 -6
- package/cjs/lib/types/ILogFileData.d.ts.map +0 -1
- package/cjs/lib/types/ILogFileData.js +0 -3
- package/cjs/lib/types/ILogFileData.js.map +0 -1
- package/cjs/lib/types/IReadJsonFileOptions.d.ts +0 -2
- package/cjs/lib/types/IReadJsonFileOptions.d.ts.map +0 -1
- package/cjs/lib/types/IReadJsonFileOptions.js +0 -3
- package/cjs/lib/types/IReadJsonFileOptions.js.map +0 -1
- package/cjs/lib/types/JsonReplacerReviver.d.ts +0 -2
- package/cjs/lib/types/JsonReplacerReviver.d.ts.map +0 -1
- package/cjs/lib/types/JsonReplacerReviver.js +0 -3
- package/cjs/lib/types/JsonReplacerReviver.js.map +0 -1
- package/cjs/lib/updateFile.d.ts +0 -11
- package/cjs/lib/updateFile.d.ts.map +0 -1
- package/cjs/lib/updateFile.js +0 -20
- package/cjs/lib/updateFile.js.map +0 -1
- package/cjs/lib/updateFileSafe.d.ts +0 -13
- package/cjs/lib/updateFileSafe.d.ts.map +0 -1
- package/cjs/lib/updateFileSafe.js +0 -28
- package/cjs/lib/updateFileSafe.js.map +0 -1
- package/cjs/lib/updateFileSafeSync.d.ts +0 -13
- package/cjs/lib/updateFileSafeSync.d.ts.map +0 -1
- package/cjs/lib/updateFileSafeSync.js +0 -28
- package/cjs/lib/updateFileSafeSync.js.map +0 -1
- package/cjs/lib/updateFileSync.d.ts +0 -11
- package/cjs/lib/updateFileSync.d.ts.map +0 -1
- package/cjs/lib/updateFileSync.js +0 -20
- package/cjs/lib/updateFileSync.js.map +0 -1
- package/cjs/lib/updateJsonFile.d.ts +0 -15
- package/cjs/lib/updateJsonFile.d.ts.map +0 -1
- package/cjs/lib/updateJsonFile.js +0 -20
- package/cjs/lib/updateJsonFile.js.map +0 -1
- package/cjs/lib/updateJsonFileSafe.d.ts +0 -17
- package/cjs/lib/updateJsonFileSafe.d.ts.map +0 -1
- package/cjs/lib/updateJsonFileSafe.js +0 -28
- package/cjs/lib/updateJsonFileSafe.js.map +0 -1
- package/cjs/lib/updateJsonFileSafeSync.d.ts +0 -17
- package/cjs/lib/updateJsonFileSafeSync.d.ts.map +0 -1
- package/cjs/lib/updateJsonFileSafeSync.js +0 -28
- package/cjs/lib/updateJsonFileSafeSync.js.map +0 -1
- package/cjs/lib/updateJsonFileSync.d.ts +0 -15
- package/cjs/lib/updateJsonFileSync.d.ts.map +0 -1
- package/cjs/lib/updateJsonFileSync.js +0 -20
- package/cjs/lib/updateJsonFileSync.js.map +0 -1
- package/cjs/lib/writeFile.d.ts +0 -2
- package/cjs/lib/writeFile.d.ts.map +0 -1
- package/cjs/lib/writeFile.js +0 -6
- package/cjs/lib/writeFile.js.map +0 -1
- package/cjs/lib/writeFileSafe.d.ts +0 -2
- package/cjs/lib/writeFileSafe.d.ts.map +0 -1
- package/cjs/lib/writeFileSafe.js +0 -6
- package/cjs/lib/writeFileSafe.js.map +0 -1
- package/cjs/lib/writeFileSafeSync.d.ts +0 -2
- package/cjs/lib/writeFileSafeSync.d.ts.map +0 -1
- package/cjs/lib/writeFileSafeSync.js +0 -6
- package/cjs/lib/writeFileSafeSync.js.map +0 -1
- package/cjs/lib/writeFileSync.d.ts +0 -2
- package/cjs/lib/writeFileSync.d.ts.map +0 -1
- package/cjs/lib/writeFileSync.js +0 -6
- package/cjs/lib/writeFileSync.js.map +0 -1
- package/cjs/lib/writeJsonFile.d.ts +0 -2
- package/cjs/lib/writeJsonFile.d.ts.map +0 -1
- package/cjs/lib/writeJsonFile.js +0 -6
- package/cjs/lib/writeJsonFile.js.map +0 -1
- package/cjs/lib/writeJsonFileSafe.d.ts +0 -2
- package/cjs/lib/writeJsonFileSafe.d.ts.map +0 -1
- package/cjs/lib/writeJsonFileSafe.js +0 -6
- package/cjs/lib/writeJsonFileSafe.js.map +0 -1
- package/cjs/lib/writeJsonFileSafeSync.d.ts +0 -2
- package/cjs/lib/writeJsonFileSafeSync.d.ts.map +0 -1
- package/cjs/lib/writeJsonFileSafeSync.js +0 -6
- package/cjs/lib/writeJsonFileSafeSync.js.map +0 -1
- package/cjs/lib/writeJsonFileSync.d.ts +0 -2
- package/cjs/lib/writeJsonFileSync.d.ts.map +0 -1
- package/cjs/lib/writeJsonFileSync.js +0 -6
- package/cjs/lib/writeJsonFileSync.js.map +0 -1
package/cjs/index.js
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./lib/appendFile"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./lib/appendFileLine"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./lib/appendFileLineSync"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./lib/appendFileSync"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./lib/createDirectory"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./lib/createDirectorySync"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./lib/emptyDirectory"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("./lib/emptyDirectorySync"), exports);
|
|
12
|
-
tslib_1.__exportStar(require("./lib/FSPathFilter"), exports);
|
|
13
|
-
tslib_1.__exportStar(require("./lib/getJsonIndentation"), exports);
|
|
14
|
-
tslib_1.__exportStar(require("./lib/getLastMofifiedFileIn"), exports);
|
|
15
|
-
tslib_1.__exportStar(require("./lib/promptUserEditInTextEditor"), exports);
|
|
16
|
-
tslib_1.__exportStar(require("./lib/promptUserEditInTextEditorSync"), exports);
|
|
17
|
-
tslib_1.__exportStar(require("./lib/promptUserEditJsonInTextEditor"), exports);
|
|
18
|
-
tslib_1.__exportStar(require("./lib/promptUserEditJsonInTextEditorSync"), exports);
|
|
19
|
-
tslib_1.__exportStar(require("./lib/readDirectoryDirents"), exports);
|
|
20
|
-
tslib_1.__exportStar(require("./lib/readDirectoryDirentsPaths"), exports);
|
|
21
|
-
tslib_1.__exportStar(require("./lib/readDirectoryDirentsPathsSafe"), exports);
|
|
22
|
-
tslib_1.__exportStar(require("./lib/readDirectoryDirentsPathsSafeSync"), exports);
|
|
23
|
-
tslib_1.__exportStar(require("./lib/readDirectoryDirentsPathsSync"), exports);
|
|
24
|
-
tslib_1.__exportStar(require("./lib/readDirectoryDirentsSafe"), exports);
|
|
25
|
-
tslib_1.__exportStar(require("./lib/readDirectoryDirentsSafeSync"), exports);
|
|
26
|
-
tslib_1.__exportStar(require("./lib/readDirectoryDirentsSync"), exports);
|
|
27
|
-
tslib_1.__exportStar(require("./lib/readDirectoryNames"), exports);
|
|
28
|
-
tslib_1.__exportStar(require("./lib/readDirectoryNamesPaths"), exports);
|
|
29
|
-
tslib_1.__exportStar(require("./lib/readDirectoryNamesPathsSafe"), exports);
|
|
30
|
-
tslib_1.__exportStar(require("./lib/readDirectoryNamesPathsSafeSync"), exports);
|
|
31
|
-
tslib_1.__exportStar(require("./lib/readDirectoryNamesPathsSync"), exports);
|
|
32
|
-
tslib_1.__exportStar(require("./lib/readDirectoryNamesSafe"), exports);
|
|
33
|
-
tslib_1.__exportStar(require("./lib/readDirectoryNamesSafeSync"), exports);
|
|
34
|
-
tslib_1.__exportStar(require("./lib/readDirectoryNamesSync"), exports);
|
|
35
|
-
tslib_1.__exportStar(require("./lib/readDirectoryPaths"), exports);
|
|
36
|
-
tslib_1.__exportStar(require("./lib/readDirectoryPathsSafe"), exports);
|
|
37
|
-
tslib_1.__exportStar(require("./lib/readDirectoryPathsSafeSync"), exports);
|
|
38
|
-
tslib_1.__exportStar(require("./lib/readDirectoryPathsSync"), exports);
|
|
39
|
-
tslib_1.__exportStar(require("./lib/readDirectoryStats"), exports);
|
|
40
|
-
tslib_1.__exportStar(require("./lib/readDirectoryStatsSafe"), exports);
|
|
41
|
-
tslib_1.__exportStar(require("./lib/readDirectoryStatsSafeSync"), exports);
|
|
42
|
-
tslib_1.__exportStar(require("./lib/readDirectoryStatsSync"), exports);
|
|
43
|
-
tslib_1.__exportStar(require("./lib/readFile"), exports);
|
|
44
|
-
tslib_1.__exportStar(require("./lib/readFileBuffer"), exports);
|
|
45
|
-
tslib_1.__exportStar(require("./lib/readFileBufferSafe"), exports);
|
|
46
|
-
tslib_1.__exportStar(require("./lib/readFileBufferSafeSync"), exports);
|
|
47
|
-
tslib_1.__exportStar(require("./lib/readFileBufferSync"), exports);
|
|
48
|
-
tslib_1.__exportStar(require("./lib/readFileFirstLine"), exports);
|
|
49
|
-
tslib_1.__exportStar(require("./lib/readFileSafe"), exports);
|
|
50
|
-
tslib_1.__exportStar(require("./lib/readFileSafeSync"), exports);
|
|
51
|
-
tslib_1.__exportStar(require("./lib/readFileSync"), exports);
|
|
52
|
-
tslib_1.__exportStar(require("./lib/readJsonFile"), exports);
|
|
53
|
-
tslib_1.__exportStar(require("./lib/readJsonFileSafe"), exports);
|
|
54
|
-
tslib_1.__exportStar(require("./lib/readJsonFileSafeSync"), exports);
|
|
55
|
-
tslib_1.__exportStar(require("./lib/readJsonFileSync"), exports);
|
|
56
|
-
tslib_1.__exportStar(require("./lib/removeDirectory"), exports);
|
|
57
|
-
tslib_1.__exportStar(require("./lib/removeDirectorySync"), exports);
|
|
58
|
-
tslib_1.__exportStar(require("./lib/removeFile"), exports);
|
|
59
|
-
tslib_1.__exportStar(require("./lib/removeFileSync"), exports);
|
|
60
|
-
tslib_1.__exportStar(require("./lib/tempFile"), exports);
|
|
61
|
-
tslib_1.__exportStar(require("./lib/tempFileSync"), exports);
|
|
62
|
-
tslib_1.__exportStar(require("./lib/types/IGetUserInputFromEditorOptions"), exports);
|
|
63
|
-
tslib_1.__exportStar(require("./lib/types/IJFReadOptions"), exports);
|
|
64
|
-
tslib_1.__exportStar(require("./lib/types/IJFWriteOptions"), exports);
|
|
65
|
-
tslib_1.__exportStar(require("./lib/types/IJsonOutputOptions"), exports);
|
|
66
|
-
tslib_1.__exportStar(require("./lib/types/ILogFileData"), exports);
|
|
67
|
-
tslib_1.__exportStar(require("./lib/types/IReadJsonFileOptions"), exports);
|
|
68
|
-
tslib_1.__exportStar(require("./lib/types/JsonReplacerReviver"), exports);
|
|
69
|
-
tslib_1.__exportStar(require("./lib/updateFile"), exports);
|
|
70
|
-
tslib_1.__exportStar(require("./lib/updateFileSafe"), exports);
|
|
71
|
-
tslib_1.__exportStar(require("./lib/updateFileSafeSync"), exports);
|
|
72
|
-
tslib_1.__exportStar(require("./lib/updateFileSync"), exports);
|
|
73
|
-
tslib_1.__exportStar(require("./lib/updateJsonFile"), exports);
|
|
74
|
-
tslib_1.__exportStar(require("./lib/updateJsonFileSafe"), exports);
|
|
75
|
-
tslib_1.__exportStar(require("./lib/updateJsonFileSafeSync"), exports);
|
|
76
|
-
tslib_1.__exportStar(require("./lib/updateJsonFileSync"), exports);
|
|
77
|
-
tslib_1.__exportStar(require("./lib/writeFile"), exports);
|
|
78
|
-
tslib_1.__exportStar(require("./lib/writeFileSafe"), exports);
|
|
79
|
-
tslib_1.__exportStar(require("./lib/writeFileSafeSync"), exports);
|
|
80
|
-
tslib_1.__exportStar(require("./lib/writeFileSync"), exports);
|
|
81
|
-
tslib_1.__exportStar(require("./lib/writeJsonFile"), exports);
|
|
82
|
-
tslib_1.__exportStar(require("./lib/writeJsonFileSafe"), exports);
|
|
83
|
-
tslib_1.__exportStar(require("./lib/writeJsonFileSafeSync"), exports);
|
|
84
|
-
tslib_1.__exportStar(require("./lib/writeJsonFileSync"), exports);
|
|
85
|
-
//# sourceMappingURL=index.js.map
|
package/cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/fs/src/index.ts"],"names":[],"mappings":";;;AAAA,2DAAgC;AAChC,+DAAoC;AACpC,mEAAwC;AACxC,+DAAoC;AACpC,gEAAqC;AACrC,oEAAyC;AACzC,+DAAoC;AACpC,mEAAwC;AACxC,6DAAkC;AAClC,mEAAwC;AACxC,sEAA2C;AAC3C,2EAAgD;AAChD,+EAAoD;AACpD,+EAAoD;AACpD,mFAAwD;AACxD,qEAA0C;AAC1C,0EAA+C;AAC/C,8EAAmD;AACnD,kFAAuD;AACvD,8EAAmD;AACnD,yEAA8C;AAC9C,6EAAkD;AAClD,yEAA8C;AAC9C,mEAAwC;AACxC,wEAA6C;AAC7C,4EAAiD;AACjD,gFAAqD;AACrD,4EAAiD;AACjD,uEAA4C;AAC5C,2EAAgD;AAChD,uEAA4C;AAC5C,mEAAwC;AACxC,uEAA4C;AAC5C,2EAAgD;AAChD,uEAA4C;AAC5C,mEAAwC;AACxC,uEAA4C;AAC5C,2EAAgD;AAChD,uEAA4C;AAC5C,yDAA8B;AAC9B,+DAAoC;AACpC,mEAAwC;AACxC,uEAA4C;AAC5C,mEAAwC;AACxC,kEAAuC;AACvC,6DAAkC;AAClC,iEAAsC;AACtC,6DAAkC;AAClC,6DAAkC;AAClC,iEAAsC;AACtC,qEAA0C;AAC1C,iEAAsC;AACtC,gEAAqC;AACrC,oEAAyC;AACzC,2DAAgC;AAChC,+DAAoC;AACpC,yDAA8B;AAC9B,6DAAkC;AAClC,qFAA0D;AAC1D,qEAA0C;AAC1C,sEAA2C;AAC3C,yEAA8C;AAC9C,mEAAwC;AACxC,2EAAgD;AAChD,0EAA+C;AAC/C,2DAAgC;AAChC,+DAAoC;AACpC,mEAAwC;AACxC,+DAAoC;AACpC,+DAAoC;AACpC,mEAAwC;AACxC,uEAA4C;AAC5C,mEAAwC;AACxC,0DAA+B;AAC/B,8DAAmC;AACnC,kEAAuC;AACvC,8DAAmC;AACnC,8DAAmC;AACnC,kEAAuC;AACvC,sEAA2C;AAC3C,kEAAuC"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { EventEmitter } from 'events';
|
|
3
|
-
export interface IPathFilterIgnoreOptions {
|
|
4
|
-
startsWith?: boolean;
|
|
5
|
-
endsWith?: boolean;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Builder class to easily and flexibly construct and implement filesystem path filtering.
|
|
9
|
-
*/
|
|
10
|
-
export declare class FSPathFilter extends EventEmitter {
|
|
11
|
-
/**
|
|
12
|
-
* Returns a new object with the default ignore options.
|
|
13
|
-
*/
|
|
14
|
-
protected static get ignoreOptionDefaults(): IPathFilterIgnoreOptions;
|
|
15
|
-
readonly filepathFilters: Array<(path: string) => boolean>;
|
|
16
|
-
readonly dirpathFilters: Array<(path: string) => boolean>;
|
|
17
|
-
readonly filenameFilters: Array<(path: string) => boolean>;
|
|
18
|
-
readonly filepathRegex: Array<RegExp>;
|
|
19
|
-
readonly dirpathRegex: Array<RegExp>;
|
|
20
|
-
readonly filenameRegex: Array<RegExp>;
|
|
21
|
-
readonly ignoredExtensions: Set<string>;
|
|
22
|
-
isCaseInsensitive: boolean;
|
|
23
|
-
constructor(options?: {
|
|
24
|
-
captureRejections?: boolean;
|
|
25
|
-
});
|
|
26
|
-
protected createRegex(ignore: string, options?: IPathFilterIgnoreOptions): RegExp;
|
|
27
|
-
/**
|
|
28
|
-
* Add a whole or partial filepath to ignore.
|
|
29
|
-
*/
|
|
30
|
-
ignoreFilepath(ignore: string, options?: IPathFilterIgnoreOptions): FSPathFilter;
|
|
31
|
-
/**
|
|
32
|
-
* Add a whole or partial dirname to ignore.
|
|
33
|
-
*/
|
|
34
|
-
ignoreDirpath(ignore: string, options?: IPathFilterIgnoreOptions): FSPathFilter;
|
|
35
|
-
/**
|
|
36
|
-
* Add a whole or partial filename to ignore.
|
|
37
|
-
*/
|
|
38
|
-
ignoreFilename(ignore: string, options?: IPathFilterIgnoreOptions): FSPathFilter;
|
|
39
|
-
/**
|
|
40
|
-
* Add a file extension type to ignore.
|
|
41
|
-
*/
|
|
42
|
-
ignoreExtension(ignore: string): FSPathFilter;
|
|
43
|
-
/**
|
|
44
|
-
* Add a custom filter function for validating filepaths
|
|
45
|
-
*/
|
|
46
|
-
filterFilepath(filter: (path: string) => boolean): FSPathFilter;
|
|
47
|
-
/**
|
|
48
|
-
* Add a custom filter function for validating dirpaths.
|
|
49
|
-
*/
|
|
50
|
-
filterDirpath(filter: (path: string) => boolean): FSPathFilter;
|
|
51
|
-
/**
|
|
52
|
-
* Add a custom filter function for validating filenames.
|
|
53
|
-
*/
|
|
54
|
-
filterFilename(filter: (path: string) => boolean): FSPathFilter;
|
|
55
|
-
/**
|
|
56
|
-
* Add a custom regex object for matching filepaths to be ignored.
|
|
57
|
-
*/
|
|
58
|
-
ignoreFilepathRegex(regex: RegExp): FSPathFilter;
|
|
59
|
-
/**
|
|
60
|
-
* Add a custom regex object for matching dirpaths to be ignored.
|
|
61
|
-
*/
|
|
62
|
-
ignoreDirpathRegex(regex: RegExp): FSPathFilter;
|
|
63
|
-
/**
|
|
64
|
-
* Add a custom regex object for matching filenames to be ignored.
|
|
65
|
-
*/
|
|
66
|
-
ignoreFilenameRegex(regex: RegExp): FSPathFilter;
|
|
67
|
-
/**
|
|
68
|
-
* Performs the configured filepath filtering.
|
|
69
|
-
*/
|
|
70
|
-
validateFilepath(filepath: string): boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Performs the configured dirpath filtering.
|
|
73
|
-
*/
|
|
74
|
-
validateDirpath(dirpath: string): boolean;
|
|
75
|
-
/**
|
|
76
|
-
* Performs the configured filename filtering.
|
|
77
|
-
*/
|
|
78
|
-
validateFilename(filename: string): boolean;
|
|
79
|
-
/**
|
|
80
|
-
* Performs the configured extension filtering.
|
|
81
|
-
*/
|
|
82
|
-
validateExtension(ext: string): boolean;
|
|
83
|
-
}
|
|
84
|
-
//# sourceMappingURL=FSPathFilter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FSPathFilter.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/FSPathFilter.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAIrC,MAAM,WAAW,wBAAwB;IACvC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;GAEG;AACH,qBAAa,YAAa,SAAQ,YAAY;IAC5C;;OAEG;IACH,SAAS,CAAC,MAAM,KAAK,oBAAoB,IAAI,wBAAwB,CAKpE;IAED,QAAQ,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAAK;IAC/D,QAAQ,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAAK;IAC9D,QAAQ,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAAK;IAE/D,QAAQ,CAAC,aAAa,EAAE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AAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAgB3C;;OAEG;IACH,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAgBzC;;OAEG;IACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAgB3C;;OAEG;IACH,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;CAGxC"}
|
package/cjs/lib/FSPathFilter.js
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FSPathFilter = void 0;
|
|
4
|
-
const events_1 = require("events");
|
|
5
|
-
const os_1 = require("@bemoje/os");
|
|
6
|
-
const regex_1 = require("@bemoje/regex");
|
|
7
|
-
/**
|
|
8
|
-
* Builder class to easily and flexibly construct and implement filesystem path filtering.
|
|
9
|
-
*/
|
|
10
|
-
class FSPathFilter extends events_1.EventEmitter {
|
|
11
|
-
/**
|
|
12
|
-
* Returns a new object with the default ignore options.
|
|
13
|
-
*/
|
|
14
|
-
static get ignoreOptionDefaults() {
|
|
15
|
-
return {
|
|
16
|
-
startsWith: false,
|
|
17
|
-
endsWith: false,
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
filepathFilters = [];
|
|
21
|
-
dirpathFilters = [];
|
|
22
|
-
filenameFilters = [];
|
|
23
|
-
filepathRegex = [];
|
|
24
|
-
dirpathRegex = [];
|
|
25
|
-
filenameRegex = [];
|
|
26
|
-
ignoredExtensions = new Set();
|
|
27
|
-
isCaseInsensitive = (0, os_1.isWindows)();
|
|
28
|
-
constructor(options = { captureRejections: true }) {
|
|
29
|
-
super(options);
|
|
30
|
-
}
|
|
31
|
-
createRegex(ignore, options = {}) {
|
|
32
|
-
options = Object.assign(FSPathFilter.ignoreOptionDefaults, options);
|
|
33
|
-
if (this.isCaseInsensitive)
|
|
34
|
-
ignore = ignore.toLowerCase();
|
|
35
|
-
ignore = (0, regex_1.regexEscapeString)(ignore);
|
|
36
|
-
if (options.startsWith)
|
|
37
|
-
ignore = '^' + ignore;
|
|
38
|
-
if (options.endsWith)
|
|
39
|
-
ignore += '$';
|
|
40
|
-
return new RegExp(ignore, this.isCaseInsensitive ? 'i' : '');
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Add a whole or partial filepath to ignore.
|
|
44
|
-
*/
|
|
45
|
-
ignoreFilepath(ignore, options) {
|
|
46
|
-
this.filepathRegex.push(this.createRegex(ignore, options));
|
|
47
|
-
return this;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Add a whole or partial dirname to ignore.
|
|
51
|
-
*/
|
|
52
|
-
ignoreDirpath(ignore, options) {
|
|
53
|
-
this.dirpathRegex.push(this.createRegex(ignore, options));
|
|
54
|
-
return this;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Add a whole or partial filename to ignore.
|
|
58
|
-
*/
|
|
59
|
-
ignoreFilename(ignore, options) {
|
|
60
|
-
this.filenameRegex.push(this.createRegex(ignore, options));
|
|
61
|
-
return this;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Add a file extension type to ignore.
|
|
65
|
-
*/
|
|
66
|
-
ignoreExtension(ignore) {
|
|
67
|
-
this.ignoredExtensions.add(ignore.replace(/^\./, '').toLowerCase());
|
|
68
|
-
return this;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Add a custom filter function for validating filepaths
|
|
72
|
-
*/
|
|
73
|
-
filterFilepath(filter) {
|
|
74
|
-
this.filepathFilters.push(filter);
|
|
75
|
-
return this;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Add a custom filter function for validating dirpaths.
|
|
79
|
-
*/
|
|
80
|
-
filterDirpath(filter) {
|
|
81
|
-
this.dirpathFilters.push(filter);
|
|
82
|
-
return this;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Add a custom filter function for validating filenames.
|
|
86
|
-
*/
|
|
87
|
-
filterFilename(filter) {
|
|
88
|
-
this.filenameFilters.push(filter);
|
|
89
|
-
return this;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Add a custom regex object for matching filepaths to be ignored.
|
|
93
|
-
*/
|
|
94
|
-
ignoreFilepathRegex(regex) {
|
|
95
|
-
this.filepathRegex.push(regex);
|
|
96
|
-
return this;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Add a custom regex object for matching dirpaths to be ignored.
|
|
100
|
-
*/
|
|
101
|
-
ignoreDirpathRegex(regex) {
|
|
102
|
-
this.dirpathRegex.push(regex);
|
|
103
|
-
return this;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Add a custom regex object for matching filenames to be ignored.
|
|
107
|
-
*/
|
|
108
|
-
ignoreFilenameRegex(regex) {
|
|
109
|
-
this.filenameRegex.push(regex);
|
|
110
|
-
return this;
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Performs the configured filepath filtering.
|
|
114
|
-
*/
|
|
115
|
-
validateFilepath(filepath) {
|
|
116
|
-
for (const fn of this.filepathFilters) {
|
|
117
|
-
if (!fn(filepath)) {
|
|
118
|
-
this.emit('ignore-filepath', filepath);
|
|
119
|
-
return false;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
for (const reg of this.filepathRegex) {
|
|
123
|
-
if (reg.test(filepath)) {
|
|
124
|
-
this.emit('ignore-filepath', filepath);
|
|
125
|
-
return false;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
return true;
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Performs the configured dirpath filtering.
|
|
132
|
-
*/
|
|
133
|
-
validateDirpath(dirpath) {
|
|
134
|
-
for (const fn of this.dirpathFilters) {
|
|
135
|
-
if (!fn(dirpath)) {
|
|
136
|
-
this.emit('ignore-dirpath', dirpath);
|
|
137
|
-
return false;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
for (const reg of this.dirpathRegex) {
|
|
141
|
-
if (reg.test(dirpath)) {
|
|
142
|
-
this.emit('ignore-dirpath', dirpath);
|
|
143
|
-
return false;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
return true;
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Performs the configured filename filtering.
|
|
150
|
-
*/
|
|
151
|
-
validateFilename(filename) {
|
|
152
|
-
for (const fn of this.filenameFilters) {
|
|
153
|
-
if (!fn(filename)) {
|
|
154
|
-
this.emit('ignore-filename', filename);
|
|
155
|
-
return false;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
for (const reg of this.filenameRegex) {
|
|
159
|
-
if (reg.test(filename)) {
|
|
160
|
-
this.emit('ignore-filename', filename);
|
|
161
|
-
return false;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
return true;
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Performs the configured extension filtering.
|
|
168
|
-
*/
|
|
169
|
-
validateExtension(ext) {
|
|
170
|
-
return !!ext && !this.ignoredExtensions.has(ext);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
exports.FSPathFilter = FSPathFilter;
|
|
174
|
-
//# sourceMappingURL=FSPathFilter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FSPathFilter.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/FSPathFilter.ts"],"names":[],"mappings":";;;AAAA,mCAAqC;AACrC,mCAAsC;AACtC,yCAAiD;AAOjD;;GAEG;AACH,MAAa,YAAa,SAAQ,qBAAY;IAC5C;;OAEG;IACO,MAAM,KAAK,oBAAoB;QACvC,OAAO;YACL,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB,CAAA;IACH,CAAC;IAEQ,eAAe,GAAqC,EAAE,CAAA;IACtD,cAAc,GAAqC,EAAE,CAAA;IACrD,eAAe,GAAqC,EAAE,CAAA;IAEtD,aAAa,GAA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C,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAA;gBACtC,OAAO,KAAK,CAAA;aACb;SACF;QACD,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;OAEG;IACH,iBAAiB,CAAC,GAAW;QAC3B,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IAClD,CAAC;CACF;AAnLD,oCAmLC"}
|
package/cjs/lib/appendFile.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Append a string to a file. Creates the file and dirpath if they do not exist.
|
|
3
|
-
* @param filepath The path of the file.
|
|
4
|
-
* @param string The string data to append.
|
|
5
|
-
* @param options - Options for including a linebreak (EOL) to the string.
|
|
6
|
-
*/
|
|
7
|
-
export declare function appendFile(filepath: string, string: string, options?: {
|
|
8
|
-
eol: 'prepend' | 'append';
|
|
9
|
-
}): Promise<void>;
|
|
10
|
-
//# sourceMappingURL=appendFile.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appendFile.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/appendFile.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAsB,UAAU,CAC9B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE;IAAE,GAAG,EAAE,SAAS,GAAG,QAAQ,CAAA;CAAE,GACtC,OAAO,CAAC,IAAI,CAAC,CAOf"}
|
package/cjs/lib/appendFile.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.appendFile = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
-
/**
|
|
7
|
-
* Append a string to a file. Creates the file and dirpath if they do not exist.
|
|
8
|
-
* @param filepath The path of the file.
|
|
9
|
-
* @param string The string data to append.
|
|
10
|
-
* @param options - Options for including a linebreak (EOL) to the string.
|
|
11
|
-
*/
|
|
12
|
-
async function appendFile(filepath, string, options) {
|
|
13
|
-
if (options) {
|
|
14
|
-
if (options.eol === 'append')
|
|
15
|
-
string = string + '\n';
|
|
16
|
-
else if (options.eol === 'prepend')
|
|
17
|
-
string = '\n' + string;
|
|
18
|
-
}
|
|
19
|
-
await fs_extra_1.default.ensureFile(filepath);
|
|
20
|
-
await fs_extra_1.default.appendFile(filepath, string);
|
|
21
|
-
}
|
|
22
|
-
exports.appendFile = appendFile;
|
|
23
|
-
//# sourceMappingURL=appendFile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appendFile.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/appendFile.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AAEzB;;;;;GAKG;AACI,KAAK,UAAU,UAAU,CAC9B,QAAgB,EAChB,MAAc,EACd,OAAuC;IAEvC,IAAI,OAAO,EAAE;QACX,IAAI,OAAO,CAAC,GAAG,KAAK,QAAQ;YAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;aAC/C,IAAI,OAAO,CAAC,GAAG,KAAK,SAAS;YAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAAA;KAC3D;IACD,MAAM,kBAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;IAC7B,MAAM,kBAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;AACvC,CAAC;AAXD,gCAWC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Append a line to a file. Creates the file and dirpath if they do not exist.
|
|
3
|
-
* @param filepath The path of the file.
|
|
4
|
-
* @param line The string data to append.
|
|
5
|
-
*/
|
|
6
|
-
export declare function appendFileLine(filepath: string, line: string): Promise<void>;
|
|
7
|
-
//# sourceMappingURL=appendFileLine.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appendFileLine.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/appendFileLine.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGlF"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.appendFileLine = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
-
/**
|
|
7
|
-
* Append a line to a file. Creates the file and dirpath if they do not exist.
|
|
8
|
-
* @param filepath The path of the file.
|
|
9
|
-
* @param line The string data to append.
|
|
10
|
-
*/
|
|
11
|
-
async function appendFileLine(filepath, line) {
|
|
12
|
-
await fs_extra_1.default.ensureFile(filepath);
|
|
13
|
-
await fs_extra_1.default.appendFile(filepath, line + '\n');
|
|
14
|
-
}
|
|
15
|
-
exports.appendFileLine = appendFileLine;
|
|
16
|
-
//# sourceMappingURL=appendFileLine.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appendFileLine.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/appendFileLine.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AAEzB;;;;GAIG;AACI,KAAK,UAAU,cAAc,CAAC,QAAgB,EAAE,IAAY;IACjE,MAAM,kBAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;IAC7B,MAAM,kBAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC,CAAA;AAC5C,CAAC;AAHD,wCAGC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Append a line to a file. Creates the file and path if they do not exist.
|
|
3
|
-
* @param filepath The path of the file.
|
|
4
|
-
* @param line The string data to append.
|
|
5
|
-
*/
|
|
6
|
-
export declare function appendFileLineSync(filepath: string, line: string): void;
|
|
7
|
-
//# sourceMappingURL=appendFileLineSync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appendFileLineSync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/appendFileLineSync.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAGvE"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.appendFileLineSync = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
-
/**
|
|
7
|
-
* Append a line to a file. Creates the file and path if they do not exist.
|
|
8
|
-
* @param filepath The path of the file.
|
|
9
|
-
* @param line The string data to append.
|
|
10
|
-
*/
|
|
11
|
-
function appendFileLineSync(filepath, line) {
|
|
12
|
-
fs_extra_1.default.ensureFileSync(filepath);
|
|
13
|
-
fs_extra_1.default.appendFileSync(filepath, line + '\n');
|
|
14
|
-
}
|
|
15
|
-
exports.appendFileLineSync = appendFileLineSync;
|
|
16
|
-
//# sourceMappingURL=appendFileLineSync.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appendFileLineSync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/appendFileLineSync.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AAEzB;;;;GAIG;AACH,SAAgB,kBAAkB,CAAC,QAAgB,EAAE,IAAY;IAC/D,kBAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAA;IAC3B,kBAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC,CAAA;AAC1C,CAAC;AAHD,gDAGC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Append a string to a file. Creates the file and dirpath if they do not exist.
|
|
3
|
-
* @param filepath The path of the file.
|
|
4
|
-
* @param string The string data to append.
|
|
5
|
-
* @param options - Options for including a linebreak (EOL) to the string.
|
|
6
|
-
*/
|
|
7
|
-
export declare function appendFileSync(filepath: string, string: string, options?: {
|
|
8
|
-
eol: 'prepend' | 'append';
|
|
9
|
-
}): void;
|
|
10
|
-
//# sourceMappingURL=appendFileSync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appendFileSync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/appendFileSync.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,GAAG,EAAE,SAAS,GAAG,QAAQ,CAAA;CAAE,GAAG,IAAI,CAO9G"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.appendFileSync = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
-
/**
|
|
7
|
-
* Append a string to a file. Creates the file and dirpath if they do not exist.
|
|
8
|
-
* @param filepath The path of the file.
|
|
9
|
-
* @param string The string data to append.
|
|
10
|
-
* @param options - Options for including a linebreak (EOL) to the string.
|
|
11
|
-
*/
|
|
12
|
-
function appendFileSync(filepath, string, options) {
|
|
13
|
-
if (options) {
|
|
14
|
-
if (options.eol === 'append')
|
|
15
|
-
string = string + '\n';
|
|
16
|
-
else if (options.eol === 'prepend')
|
|
17
|
-
string = '\n' + string;
|
|
18
|
-
}
|
|
19
|
-
fs_extra_1.default.ensureFileSync(filepath);
|
|
20
|
-
fs_extra_1.default.appendFileSync(filepath, string);
|
|
21
|
-
}
|
|
22
|
-
exports.appendFileSync = appendFileSync;
|
|
23
|
-
//# sourceMappingURL=appendFileSync.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appendFileSync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/appendFileSync.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AAEzB;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,QAAgB,EAAE,MAAc,EAAE,OAAuC;IACtG,IAAI,OAAO,EAAE;QACX,IAAI,OAAO,CAAC,GAAG,KAAK,QAAQ;YAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;aAC/C,IAAI,OAAO,CAAC,GAAG,KAAK,SAAS;YAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAAA;KAC3D;IACD,kBAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAA;IAC3B,kBAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;AACrC,CAAC;AAPD,wCAOC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Create a directory at a given path if it does not exist.
|
|
3
|
-
* Automatically creates parent directories if they do not exist.
|
|
4
|
-
* @param dirpath The path where the directory should be created.
|
|
5
|
-
* @returns The path of the directory.
|
|
6
|
-
* ```
|
|
7
|
-
*/
|
|
8
|
-
export declare function createDirectory(dirpath: string): Promise<string>;
|
|
9
|
-
//# sourceMappingURL=createDirectory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createDirectory.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/createDirectory.ts"],"names":[],"mappings":"AACA;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGtE"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createDirectory = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
-
/**
|
|
7
|
-
* Create a directory at a given path if it does not exist.
|
|
8
|
-
* Automatically creates parent directories if they do not exist.
|
|
9
|
-
* @param dirpath The path where the directory should be created.
|
|
10
|
-
* @returns The path of the directory.
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
|
-
async function createDirectory(dirpath) {
|
|
14
|
-
await fs_extra_1.default.ensureDir(dirpath);
|
|
15
|
-
return dirpath;
|
|
16
|
-
}
|
|
17
|
-
exports.createDirectory = createDirectory;
|
|
18
|
-
//# sourceMappingURL=createDirectory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createDirectory.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/createDirectory.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB;;;;;;GAMG;AACI,KAAK,UAAU,eAAe,CAAC,OAAe;IACnD,MAAM,kBAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;IAC3B,OAAO,OAAO,CAAA;AAChB,CAAC;AAHD,0CAGC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Create a directory at a given path if it does not exist.
|
|
3
|
-
* Automatically creates parent directories if they do not exist.
|
|
4
|
-
* @param dirpath The path where the directory should be created.
|
|
5
|
-
* @returns The path of the directory.
|
|
6
|
-
*/
|
|
7
|
-
export declare function createDirectorySync(dirpath: string): string;
|
|
8
|
-
//# sourceMappingURL=createDirectorySync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createDirectorySync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/createDirectorySync.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAG3D"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createDirectorySync = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
-
/**
|
|
7
|
-
* Create a directory at a given path if it does not exist.
|
|
8
|
-
* Automatically creates parent directories if they do not exist.
|
|
9
|
-
* @param dirpath The path where the directory should be created.
|
|
10
|
-
* @returns The path of the directory.
|
|
11
|
-
*/
|
|
12
|
-
function createDirectorySync(dirpath) {
|
|
13
|
-
fs_extra_1.default.ensureDirSync(dirpath);
|
|
14
|
-
return dirpath;
|
|
15
|
-
}
|
|
16
|
-
exports.createDirectorySync = createDirectorySync;
|
|
17
|
-
//# sourceMappingURL=createDirectorySync.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createDirectorySync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/createDirectorySync.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AAEzB;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAC,OAAe;IACjD,kBAAE,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;IACzB,OAAO,OAAO,CAAA;AAChB,CAAC;AAHD,kDAGC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import fs from 'fs-extra';
|
|
3
|
-
/**
|
|
4
|
-
* Ensures that a directory is empty. Deletes directory contents if the directory is not empty.
|
|
5
|
-
* If the directory does not exist, it is created.
|
|
6
|
-
* The directory itself is not deleted.
|
|
7
|
-
*
|
|
8
|
-
* Pass a predicate function to remove only certain files from the directory.
|
|
9
|
-
*
|
|
10
|
-
* @param dirpath - The path of the directory to wipe.
|
|
11
|
-
* @param predicate - If the function returns true for a file, that file is removed from the directory.
|
|
12
|
-
*/
|
|
13
|
-
export declare function emptyDirectory(dirpath: string, predicate?: (stats: fs.Stats & {
|
|
14
|
-
name: string;
|
|
15
|
-
get path(): string;
|
|
16
|
-
}) => boolean | Promise<boolean>): Promise<void>;
|
|
17
|
-
//# sourceMappingURL=emptyDirectory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"emptyDirectory.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/emptyDirectory.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AAGzB;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,IAAI,IAAI,MAAM,CAAA;CAAE,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,GACjG,OAAO,CAAC,IAAI,CAAC,CAKf"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.emptyDirectory = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
-
const readDirectoryStats_1 = require("./readDirectoryStats");
|
|
7
|
-
/**
|
|
8
|
-
* Ensures that a directory is empty. Deletes directory contents if the directory is not empty.
|
|
9
|
-
* If the directory does not exist, it is created.
|
|
10
|
-
* The directory itself is not deleted.
|
|
11
|
-
*
|
|
12
|
-
* Pass a predicate function to remove only certain files from the directory.
|
|
13
|
-
*
|
|
14
|
-
* @param dirpath - The path of the directory to wipe.
|
|
15
|
-
* @param predicate - If the function returns true for a file, that file is removed from the directory.
|
|
16
|
-
*/
|
|
17
|
-
async function emptyDirectory(dirpath, predicate) {
|
|
18
|
-
if (!predicate)
|
|
19
|
-
return await fs_extra_1.default.emptyDir(dirpath);
|
|
20
|
-
for (const stats of await (0, readDirectoryStats_1.readDirectoryStats)(dirpath)) {
|
|
21
|
-
if (await predicate(stats))
|
|
22
|
-
await fs_extra_1.default.remove(stats.path);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.emptyDirectory = emptyDirectory;
|
|
26
|
-
//# sourceMappingURL=emptyDirectory.js.map
|