@bemoje/fs 0.2.10 → 0.2.13
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 +2 -2
- package/cjs/index.d.ts +80 -0
- package/cjs/index.d.ts.map +1 -0
- package/cjs/index.js +83 -0
- package/cjs/index.js.map +1 -0
- package/cjs/lib/appendFile.d.ts +10 -0
- package/cjs/lib/appendFile.d.ts.map +1 -0
- package/cjs/lib/appendFile.js +23 -0
- package/cjs/lib/appendFile.js.map +1 -0
- package/cjs/lib/appendFileLine.d.ts +7 -0
- package/cjs/lib/appendFileLine.d.ts.map +1 -0
- package/cjs/lib/appendFileLine.js +16 -0
- package/cjs/lib/appendFileLine.js.map +1 -0
- package/cjs/lib/appendFileLineSync.d.ts +7 -0
- package/cjs/lib/appendFileLineSync.d.ts.map +1 -0
- package/cjs/lib/appendFileLineSync.js +16 -0
- package/cjs/lib/appendFileLineSync.js.map +1 -0
- package/cjs/lib/appendFileSync.d.ts +10 -0
- package/cjs/lib/appendFileSync.d.ts.map +1 -0
- package/cjs/lib/appendFileSync.js +23 -0
- package/cjs/lib/appendFileSync.js.map +1 -0
- package/{src → cjs}/lib/createDirectory.d.ts +1 -5
- package/cjs/lib/createDirectory.d.ts.map +1 -0
- package/cjs/lib/createDirectory.js +18 -0
- package/cjs/lib/createDirectory.js.map +1 -0
- package/{src → cjs}/lib/createDirectorySync.d.ts +1 -3
- package/cjs/lib/createDirectorySync.d.ts.map +1 -0
- package/{src → cjs}/lib/createDirectorySync.js +2 -5
- package/cjs/lib/createDirectorySync.js.map +1 -0
- package/cjs/lib/emptyDirectory.d.ts +17 -0
- package/cjs/lib/emptyDirectory.d.ts.map +1 -0
- package/cjs/lib/emptyDirectory.js +26 -0
- package/cjs/lib/emptyDirectory.js.map +1 -0
- package/cjs/lib/emptyDirectorySync.d.ts +17 -0
- package/cjs/lib/emptyDirectorySync.d.ts.map +1 -0
- package/cjs/lib/emptyDirectorySync.js +29 -0
- package/cjs/lib/emptyDirectorySync.js.map +1 -0
- package/{src → cjs}/lib/getJsonIndentation.d.ts +1 -0
- package/cjs/lib/getJsonIndentation.d.ts.map +1 -0
- package/{src → cjs}/lib/getJsonIndentation.js +2 -2
- package/{src → cjs}/lib/getJsonIndentation.js.map +1 -1
- package/{src → cjs}/lib/getLastMofifiedFileIn.d.ts +1 -0
- package/cjs/lib/getLastMofifiedFileIn.d.ts.map +1 -0
- package/cjs/lib/getLastMofifiedFileIn.js +20 -0
- package/cjs/lib/getLastMofifiedFileIn.js.map +1 -0
- package/cjs/lib/promptUserEditInTextEditor.d.ts +10 -0
- package/cjs/lib/promptUserEditInTextEditor.d.ts.map +1 -0
- package/cjs/lib/promptUserEditInTextEditor.js +29 -0
- package/cjs/lib/promptUserEditInTextEditor.js.map +1 -0
- package/cjs/lib/promptUserEditInTextEditorSync.d.ts +10 -0
- package/cjs/lib/promptUserEditInTextEditorSync.d.ts.map +1 -0
- package/cjs/lib/promptUserEditInTextEditorSync.js +27 -0
- package/cjs/lib/promptUserEditInTextEditorSync.js.map +1 -0
- package/cjs/lib/promptUserEditJsonInTextEditor.d.ts +13 -0
- package/cjs/lib/promptUserEditJsonInTextEditor.d.ts.map +1 -0
- package/cjs/lib/promptUserEditJsonInTextEditor.js +25 -0
- package/cjs/lib/promptUserEditJsonInTextEditor.js.map +1 -0
- package/cjs/lib/promptUserEditJsonInTextEditorSync.d.ts +13 -0
- package/cjs/lib/promptUserEditJsonInTextEditorSync.d.ts.map +1 -0
- package/cjs/lib/promptUserEditJsonInTextEditorSync.js +25 -0
- package/cjs/lib/promptUserEditJsonInTextEditorSync.js.map +1 -0
- package/cjs/lib/readDirectoryDirents.d.ts +11 -0
- package/cjs/lib/readDirectoryDirents.d.ts.map +1 -0
- package/cjs/lib/readDirectoryDirents.js +17 -0
- package/cjs/lib/readDirectoryDirents.js.map +1 -0
- package/cjs/lib/readDirectoryDirentsPaths.d.ts +14 -0
- package/cjs/lib/readDirectoryDirentsPaths.d.ts.map +1 -0
- package/cjs/lib/readDirectoryDirentsPaths.js +27 -0
- package/cjs/lib/readDirectoryDirentsPaths.js.map +1 -0
- package/cjs/lib/readDirectoryDirentsPathsSafe.d.ts +15 -0
- package/cjs/lib/readDirectoryDirentsPathsSafe.d.ts.map +1 -0
- package/cjs/lib/readDirectoryDirentsPathsSafe.js +22 -0
- package/cjs/lib/readDirectoryDirentsPathsSafe.js.map +1 -0
- package/cjs/lib/readDirectoryDirentsPathsSafeSync.d.ts +15 -0
- package/cjs/lib/readDirectoryDirentsPathsSafeSync.d.ts.map +1 -0
- package/cjs/lib/readDirectoryDirentsPathsSafeSync.js +22 -0
- package/cjs/lib/readDirectoryDirentsPathsSafeSync.js.map +1 -0
- package/cjs/lib/readDirectoryDirentsPathsSync.d.ts +14 -0
- package/cjs/lib/readDirectoryDirentsPathsSync.d.ts.map +1 -0
- package/cjs/lib/readDirectoryDirentsPathsSync.js +27 -0
- package/cjs/lib/readDirectoryDirentsPathsSync.js.map +1 -0
- package/cjs/lib/readDirectoryDirentsSafe.d.ts +12 -0
- package/cjs/lib/readDirectoryDirentsSafe.d.ts.map +1 -0
- package/cjs/lib/readDirectoryDirentsSafe.js +20 -0
- package/cjs/lib/readDirectoryDirentsSafe.js.map +1 -0
- package/cjs/lib/readDirectoryDirentsSafeSync.d.ts +12 -0
- package/cjs/lib/readDirectoryDirentsSafeSync.d.ts.map +1 -0
- package/cjs/lib/readDirectoryDirentsSafeSync.js +20 -0
- package/cjs/lib/readDirectoryDirentsSafeSync.js.map +1 -0
- package/cjs/lib/readDirectoryDirentsSync.d.ts +11 -0
- package/cjs/lib/readDirectoryDirentsSync.d.ts.map +1 -0
- package/cjs/lib/readDirectoryDirentsSync.js +17 -0
- package/cjs/lib/readDirectoryDirentsSync.js.map +1 -0
- package/cjs/lib/readDirectoryNames.d.ts +7 -0
- package/cjs/lib/readDirectoryNames.d.ts.map +1 -0
- package/cjs/lib/readDirectoryNames.js +15 -0
- package/cjs/lib/readDirectoryNames.js.map +1 -0
- package/cjs/lib/readDirectoryNamesPaths.d.ts +11 -0
- package/cjs/lib/readDirectoryNamesPaths.d.ts.map +1 -0
- package/cjs/lib/readDirectoryNamesPaths.js +24 -0
- package/cjs/lib/readDirectoryNamesPaths.js.map +1 -0
- package/cjs/lib/readDirectoryNamesPathsSafe.d.ts +12 -0
- package/cjs/lib/readDirectoryNamesPathsSafe.d.ts.map +1 -0
- package/cjs/lib/readDirectoryNamesPathsSafe.js +20 -0
- package/cjs/lib/readDirectoryNamesPathsSafe.js.map +1 -0
- package/cjs/lib/readDirectoryNamesPathsSafeSync.d.ts +12 -0
- package/cjs/lib/readDirectoryNamesPathsSafeSync.d.ts.map +1 -0
- package/cjs/lib/readDirectoryNamesPathsSafeSync.js +20 -0
- package/cjs/lib/readDirectoryNamesPathsSafeSync.js.map +1 -0
- package/cjs/lib/readDirectoryNamesPathsSync.d.ts +11 -0
- package/cjs/lib/readDirectoryNamesPathsSync.d.ts.map +1 -0
- package/cjs/lib/readDirectoryNamesPathsSync.js +24 -0
- package/cjs/lib/readDirectoryNamesPathsSync.js.map +1 -0
- package/cjs/lib/readDirectoryNamesSafe.d.ts +8 -0
- package/cjs/lib/readDirectoryNamesSafe.d.ts.map +1 -0
- package/cjs/lib/readDirectoryNamesSafe.js +18 -0
- package/cjs/lib/readDirectoryNamesSafe.js.map +1 -0
- package/cjs/lib/readDirectoryNamesSafeSync.d.ts +8 -0
- package/cjs/lib/readDirectoryNamesSafeSync.d.ts.map +1 -0
- package/cjs/lib/readDirectoryNamesSafeSync.js +18 -0
- package/cjs/lib/readDirectoryNamesSafeSync.js.map +1 -0
- package/cjs/lib/readDirectoryNamesSync.d.ts +7 -0
- package/cjs/lib/readDirectoryNamesSync.d.ts.map +1 -0
- package/cjs/lib/readDirectoryNamesSync.js +15 -0
- package/cjs/lib/readDirectoryNamesSync.js.map +1 -0
- package/cjs/lib/readDirectoryPaths.d.ts +7 -0
- package/cjs/lib/readDirectoryPaths.d.ts.map +1 -0
- package/cjs/lib/readDirectoryPaths.js +18 -0
- package/cjs/lib/readDirectoryPaths.js.map +1 -0
- package/cjs/lib/readDirectoryPathsSafe.d.ts +8 -0
- package/cjs/lib/readDirectoryPathsSafe.d.ts.map +1 -0
- package/cjs/lib/readDirectoryPathsSafe.js +19 -0
- package/cjs/lib/readDirectoryPathsSafe.js.map +1 -0
- package/cjs/lib/readDirectoryPathsSafeSync.d.ts +8 -0
- package/cjs/lib/readDirectoryPathsSafeSync.d.ts.map +1 -0
- package/cjs/lib/readDirectoryPathsSafeSync.js +19 -0
- package/cjs/lib/readDirectoryPathsSafeSync.js.map +1 -0
- package/cjs/lib/readDirectoryPathsSync.d.ts +7 -0
- package/cjs/lib/readDirectoryPathsSync.d.ts.map +1 -0
- package/cjs/lib/readDirectoryPathsSync.js +18 -0
- package/cjs/lib/readDirectoryPathsSync.js.map +1 -0
- package/cjs/lib/readDirectoryStats.d.ts +13 -0
- package/cjs/lib/readDirectoryStats.d.ts.map +1 -0
- package/cjs/lib/readDirectoryStats.js +33 -0
- package/cjs/lib/readDirectoryStats.js.map +1 -0
- package/cjs/lib/readDirectoryStatsSafe.d.ts +14 -0
- package/cjs/lib/readDirectoryStatsSafe.d.ts.map +1 -0
- package/cjs/lib/readDirectoryStatsSafe.js +20 -0
- package/cjs/lib/readDirectoryStatsSafe.js.map +1 -0
- package/cjs/lib/readDirectoryStatsSafeSync.d.ts +14 -0
- package/cjs/lib/readDirectoryStatsSafeSync.d.ts.map +1 -0
- package/cjs/lib/readDirectoryStatsSafeSync.js +20 -0
- package/cjs/lib/readDirectoryStatsSafeSync.js.map +1 -0
- package/cjs/lib/readDirectoryStatsSync.d.ts +13 -0
- package/cjs/lib/readDirectoryStatsSync.d.ts.map +1 -0
- package/cjs/lib/readDirectoryStatsSync.js +32 -0
- package/cjs/lib/readDirectoryStatsSync.js.map +1 -0
- package/cjs/lib/readFile.d.ts +22 -0
- package/cjs/lib/readFile.d.ts.map +1 -0
- package/cjs/lib/readFile.js +21 -0
- package/cjs/lib/readFile.js.map +1 -0
- package/cjs/lib/readFileBuffer.d.ts +20 -0
- package/cjs/lib/readFileBuffer.d.ts.map +1 -0
- package/cjs/lib/readFileBuffer.js +20 -0
- package/cjs/lib/readFileBuffer.js.map +1 -0
- package/cjs/lib/readFileBufferSafe.d.ts +12 -0
- package/cjs/lib/readFileBufferSafe.d.ts.map +1 -0
- package/cjs/lib/readFileBufferSafe.js +24 -0
- package/cjs/lib/readFileBufferSafe.js.map +1 -0
- package/cjs/lib/readFileBufferSafeSync.d.ts +12 -0
- package/cjs/lib/readFileBufferSafeSync.d.ts.map +1 -0
- package/cjs/lib/readFileBufferSafeSync.js +24 -0
- package/cjs/lib/readFileBufferSafeSync.js.map +1 -0
- package/cjs/lib/readFileBufferSync.d.ts +10 -0
- package/cjs/lib/readFileBufferSync.d.ts.map +1 -0
- package/cjs/lib/readFileBufferSync.js +17 -0
- package/cjs/lib/readFileBufferSync.js.map +1 -0
- package/cjs/lib/readFileSafe.d.ts +14 -0
- package/cjs/lib/readFileSafe.d.ts.map +1 -0
- package/cjs/lib/readFileSafe.js +26 -0
- package/cjs/lib/readFileSafe.js.map +1 -0
- package/cjs/lib/readFileSafeSync.d.ts +14 -0
- package/cjs/lib/readFileSafeSync.d.ts.map +1 -0
- package/cjs/lib/readFileSafeSync.js +26 -0
- package/cjs/lib/readFileSafeSync.js.map +1 -0
- package/cjs/lib/readFileSync.d.ts +11 -0
- package/cjs/lib/readFileSync.d.ts.map +1 -0
- package/cjs/lib/readFileSync.js +18 -0
- package/cjs/lib/readFileSync.js.map +1 -0
- package/cjs/lib/readJsonFile.d.ts +2 -0
- package/cjs/lib/readJsonFile.d.ts.map +1 -0
- package/cjs/lib/readJsonFile.js +6 -0
- package/cjs/lib/readJsonFile.js.map +1 -0
- package/cjs/lib/readJsonFileSafe.d.ts +10 -0
- package/cjs/lib/readJsonFileSafe.d.ts.map +1 -0
- package/cjs/lib/readJsonFileSafe.js +22 -0
- package/cjs/lib/readJsonFileSafe.js.map +1 -0
- package/cjs/lib/readJsonFileSafeSync.d.ts +10 -0
- package/cjs/lib/readJsonFileSafeSync.d.ts.map +1 -0
- package/cjs/lib/readJsonFileSafeSync.js +22 -0
- package/cjs/lib/readJsonFileSafeSync.js.map +1 -0
- package/cjs/lib/readJsonFileSync.d.ts +2 -0
- package/cjs/lib/readJsonFileSync.d.ts.map +1 -0
- package/cjs/lib/readJsonFileSync.js +6 -0
- package/cjs/lib/readJsonFileSync.js.map +1 -0
- package/cjs/lib/removeDirectory.d.ts +2 -0
- package/cjs/lib/removeDirectory.d.ts.map +1 -0
- package/cjs/lib/removeDirectory.js +6 -0
- package/cjs/lib/removeDirectory.js.map +1 -0
- package/cjs/lib/removeDirectorySync.d.ts +2 -0
- package/cjs/lib/removeDirectorySync.d.ts.map +1 -0
- package/cjs/lib/removeDirectorySync.js +6 -0
- package/cjs/lib/removeDirectorySync.js.map +1 -0
- package/cjs/lib/removeFile.d.ts +2 -0
- package/cjs/lib/removeFile.d.ts.map +1 -0
- package/cjs/lib/removeFile.js +6 -0
- package/cjs/lib/removeFile.js.map +1 -0
- package/cjs/lib/removeFileSync.d.ts +2 -0
- package/cjs/lib/removeFileSync.d.ts.map +1 -0
- package/cjs/lib/removeFileSync.js +6 -0
- package/cjs/lib/removeFileSync.js.map +1 -0
- package/{src → cjs}/lib/tempFile.d.ts +3 -2
- package/cjs/lib/tempFile.d.ts.map +1 -0
- package/cjs/lib/tempFile.js +27 -0
- package/cjs/lib/tempFile.js.map +1 -0
- package/cjs/lib/tempFileSync.d.ts +7 -0
- package/cjs/lib/tempFileSync.d.ts.map +1 -0
- package/cjs/lib/tempFileSync.js +27 -0
- package/cjs/lib/tempFileSync.js.map +1 -0
- package/cjs/lib/types/IGetUserInputFromEditorOptions.d.ts +16 -0
- package/cjs/lib/types/IGetUserInputFromEditorOptions.d.ts.map +1 -0
- package/{src/lib/types/IEnsureValidWindowsPathOptions.js → cjs/lib/types/IGetUserInputFromEditorOptions.js} +1 -1
- package/cjs/lib/types/IGetUserInputFromEditorOptions.js.map +1 -0
- package/cjs/lib/types/IJFReadOptions.d.ts +2 -0
- package/cjs/lib/types/IJFReadOptions.d.ts.map +1 -0
- package/cjs/lib/types/IJFReadOptions.js +3 -0
- package/cjs/lib/types/IJFReadOptions.js.map +1 -0
- package/cjs/lib/types/IJFWriteOptions.d.ts +2 -0
- package/cjs/lib/types/IJFWriteOptions.d.ts.map +1 -0
- package/cjs/lib/types/IJFWriteOptions.js +3 -0
- package/cjs/lib/types/IJFWriteOptions.js.map +1 -0
- package/cjs/lib/types/IJsonOutputOptions.d.ts +2 -0
- package/cjs/lib/types/IJsonOutputOptions.d.ts.map +1 -0
- package/cjs/lib/types/IJsonOutputOptions.js +3 -0
- package/cjs/lib/types/IJsonOutputOptions.js.map +1 -0
- package/{src → cjs}/lib/types/ILogFileData.d.ts +1 -0
- package/cjs/lib/types/ILogFileData.d.ts.map +1 -0
- package/cjs/lib/types/IReadJsonFileOptions.d.ts +2 -0
- package/cjs/lib/types/IReadJsonFileOptions.d.ts.map +1 -0
- package/cjs/lib/types/IReadJsonFileOptions.js +3 -0
- package/cjs/lib/types/IReadJsonFileOptions.js.map +1 -0
- package/cjs/lib/types/JsonReplacerReviver.d.ts +2 -0
- package/cjs/lib/types/JsonReplacerReviver.d.ts.map +1 -0
- package/cjs/lib/types/JsonReplacerReviver.js +3 -0
- package/cjs/lib/types/JsonReplacerReviver.js.map +1 -0
- package/cjs/lib/updateFile.d.ts +11 -0
- package/cjs/lib/updateFile.d.ts.map +1 -0
- package/cjs/lib/updateFile.js +20 -0
- package/cjs/lib/updateFile.js.map +1 -0
- package/cjs/lib/updateFileSafe.d.ts +13 -0
- package/cjs/lib/updateFileSafe.d.ts.map +1 -0
- package/cjs/lib/updateFileSafe.js +28 -0
- package/cjs/lib/updateFileSafe.js.map +1 -0
- package/cjs/lib/updateFileSafeSync.d.ts +13 -0
- package/cjs/lib/updateFileSafeSync.d.ts.map +1 -0
- package/cjs/lib/updateFileSafeSync.js +28 -0
- package/cjs/lib/updateFileSafeSync.js.map +1 -0
- package/cjs/lib/updateFileSync.d.ts +11 -0
- package/cjs/lib/updateFileSync.d.ts.map +1 -0
- package/cjs/lib/updateFileSync.js +20 -0
- package/cjs/lib/updateFileSync.js.map +1 -0
- package/cjs/lib/updateJsonFile.d.ts +15 -0
- package/cjs/lib/updateJsonFile.d.ts.map +1 -0
- package/cjs/lib/updateJsonFile.js +20 -0
- package/cjs/lib/updateJsonFile.js.map +1 -0
- package/cjs/lib/updateJsonFileSafe.d.ts +17 -0
- package/cjs/lib/updateJsonFileSafe.d.ts.map +1 -0
- package/cjs/lib/updateJsonFileSafe.js +28 -0
- package/cjs/lib/updateJsonFileSafe.js.map +1 -0
- package/cjs/lib/updateJsonFileSafeSync.d.ts +17 -0
- package/cjs/lib/updateJsonFileSafeSync.d.ts.map +1 -0
- package/cjs/lib/updateJsonFileSafeSync.js +28 -0
- package/cjs/lib/updateJsonFileSafeSync.js.map +1 -0
- package/cjs/lib/updateJsonFileSync.d.ts +15 -0
- package/cjs/lib/updateJsonFileSync.d.ts.map +1 -0
- package/cjs/lib/updateJsonFileSync.js +20 -0
- package/cjs/lib/updateJsonFileSync.js.map +1 -0
- package/cjs/lib/writeFile.d.ts +2 -0
- package/cjs/lib/writeFile.d.ts.map +1 -0
- package/cjs/lib/writeFile.js +6 -0
- package/cjs/lib/writeFile.js.map +1 -0
- package/cjs/lib/writeFileSafe.d.ts +2 -0
- package/cjs/lib/writeFileSafe.d.ts.map +1 -0
- package/cjs/lib/writeFileSafe.js +6 -0
- package/cjs/lib/writeFileSafe.js.map +1 -0
- package/cjs/lib/writeFileSafeSync.d.ts +2 -0
- package/cjs/lib/writeFileSafeSync.d.ts.map +1 -0
- package/cjs/lib/writeFileSafeSync.js +6 -0
- package/cjs/lib/writeFileSafeSync.js.map +1 -0
- package/cjs/lib/writeFileSync.d.ts +2 -0
- package/cjs/lib/writeFileSync.d.ts.map +1 -0
- package/cjs/lib/writeFileSync.js +6 -0
- package/cjs/lib/writeFileSync.js.map +1 -0
- package/cjs/lib/writeJsonFile.d.ts +2 -0
- package/cjs/lib/writeJsonFile.d.ts.map +1 -0
- package/cjs/lib/writeJsonFile.js +6 -0
- package/cjs/lib/writeJsonFile.js.map +1 -0
- package/cjs/lib/writeJsonFileSafe.d.ts +2 -0
- package/cjs/lib/writeJsonFileSafe.d.ts.map +1 -0
- package/cjs/lib/writeJsonFileSafe.js +6 -0
- package/cjs/lib/writeJsonFileSafe.js.map +1 -0
- package/cjs/lib/writeJsonFileSafeSync.d.ts +2 -0
- package/cjs/lib/writeJsonFileSafeSync.d.ts.map +1 -0
- package/cjs/lib/writeJsonFileSafeSync.js +6 -0
- package/cjs/lib/writeJsonFileSafeSync.js.map +1 -0
- package/cjs/lib/writeJsonFileSync.d.ts +2 -0
- package/cjs/lib/writeJsonFileSync.d.ts.map +1 -0
- package/cjs/lib/writeJsonFileSync.js +6 -0
- package/cjs/lib/writeJsonFileSync.js.map +1 -0
- package/package.json +11 -17
- package/src/index.d.ts +0 -35
- package/src/index.js +0 -39
- package/src/index.js.map +0 -1
- package/src/lib/AppData.d.ts +0 -10
- package/src/lib/AppData.js +0 -24
- package/src/lib/AppData.js.map +0 -1
- package/src/lib/JsonFile.d.ts +0 -78
- package/src/lib/JsonFile.js +0 -158
- package/src/lib/JsonFile.js.map +0 -1
- package/src/lib/LogFile.d.ts +0 -50
- package/src/lib/LogFile.js +0 -158
- package/src/lib/LogFile.js.map +0 -1
- package/src/lib/absoluteToRelativePath.d.ts +0 -13
- package/src/lib/absoluteToRelativePath.js +0 -25
- package/src/lib/absoluteToRelativePath.js.map +0 -1
- package/src/lib/appendLineToFile.d.ts +0 -11
- package/src/lib/appendLineToFile.js +0 -28
- package/src/lib/appendLineToFile.js.map +0 -1
- package/src/lib/cleanDirectorySync.d.ts +0 -16
- package/src/lib/cleanDirectorySync.js +0 -29
- package/src/lib/cleanDirectorySync.js.map +0 -1
- package/src/lib/createDirectory.js +0 -25
- package/src/lib/createDirectory.js.map +0 -1
- package/src/lib/createDirectorySync.js.map +0 -1
- package/src/lib/createFileExtensionFilter.d.ts +0 -13
- package/src/lib/createFileExtensionFilter.js +0 -32
- package/src/lib/createFileExtensionFilter.js.map +0 -1
- package/src/lib/cwdpath.d.ts +0 -12
- package/src/lib/cwdpath.js +0 -21
- package/src/lib/cwdpath.js.map +0 -1
- package/src/lib/deleteDirectory.d.ts +0 -12
- package/src/lib/deleteDirectory.js +0 -23
- package/src/lib/deleteDirectory.js.map +0 -1
- package/src/lib/deleteDirectorySafe.d.ts +0 -13
- package/src/lib/deleteDirectorySafe.js +0 -25
- package/src/lib/deleteDirectorySafe.js.map +0 -1
- package/src/lib/deleteDirectorySafeSync.d.ts +0 -11
- package/src/lib/deleteDirectorySafeSync.js +0 -23
- package/src/lib/deleteDirectorySafeSync.js.map +0 -1
- package/src/lib/deleteDirectorySync.d.ts +0 -12
- package/src/lib/deleteDirectorySync.js +0 -22
- package/src/lib/deleteDirectorySync.js.map +0 -1
- package/src/lib/ensureValidWindowsPath.d.ts +0 -22
- package/src/lib/ensureValidWindowsPath.js +0 -54
- package/src/lib/ensureValidWindowsPath.js.map +0 -1
- package/src/lib/getDiskDrivesWindows.d.ts +0 -1
- package/src/lib/getDiskDrivesWindows.js +0 -19
- package/src/lib/getDiskDrivesWindows.js.map +0 -1
- package/src/lib/getDownloadsDirectory.d.ts +0 -1
- package/src/lib/getDownloadsDirectory.js +0 -11
- package/src/lib/getDownloadsDirectory.js.map +0 -1
- package/src/lib/getHomeDirectory.d.ts +0 -1
- package/src/lib/getHomeDirectory.js +0 -13
- package/src/lib/getHomeDirectory.js.map +0 -1
- package/src/lib/getLastMofifiedFileIn.js +0 -22
- package/src/lib/getLastMofifiedFileIn.js.map +0 -1
- package/src/lib/getRootDir.d.ts +0 -1
- package/src/lib/getRootDir.js +0 -10
- package/src/lib/getRootDir.js.map +0 -1
- package/src/lib/normalizeFileExtension.d.ts +0 -22
- package/src/lib/normalizeFileExtension.js +0 -36
- package/src/lib/normalizeFileExtension.js.map +0 -1
- package/src/lib/readFileLastLines.d.ts +0 -7
- package/src/lib/readFileLastLines.js +0 -18
- package/src/lib/readFileLastLines.js.map +0 -1
- package/src/lib/readJsonFile.d.ts +0 -12
- package/src/lib/readJsonFile.js +0 -23
- package/src/lib/readJsonFile.js.map +0 -1
- package/src/lib/readJsonFileSync.d.ts +0 -12
- package/src/lib/readJsonFileSync.js +0 -21
- package/src/lib/readJsonFileSync.js.map +0 -1
- package/src/lib/readPackageJson.d.ts +0 -1
- package/src/lib/readPackageJson.js +0 -15
- package/src/lib/readPackageJson.js.map +0 -1
- package/src/lib/removeIllegalFilenameCharacters.d.ts +0 -1
- package/src/lib/removeIllegalFilenameCharacters.js +0 -8
- package/src/lib/removeIllegalFilenameCharacters.js.map +0 -1
- package/src/lib/tempFile.js +0 -26
- package/src/lib/tempFile.js.map +0 -1
- package/src/lib/types/IEnsureValidWindowsPathOptions.d.ts +0 -10
- package/src/lib/types/IEnsureValidWindowsPathOptions.js.map +0 -1
- package/src/lib/updateJsonFile.d.ts +0 -18
- package/src/lib/updateJsonFile.js +0 -44
- package/src/lib/updateJsonFile.js.map +0 -1
- package/src/lib/updateJsonFileSync.d.ts +0 -18
- package/src/lib/updateJsonFileSync.js +0 -42
- package/src/lib/updateJsonFileSync.js.map +0 -1
- package/src/lib/wipeDirectorySafe.d.ts +0 -1
- package/src/lib/wipeDirectorySafe.js +0 -14
- package/src/lib/wipeDirectorySafe.js.map +0 -1
- package/src/lib/writeJsonFile.d.ts +0 -14
- package/src/lib/writeJsonFile.js +0 -25
- package/src/lib/writeJsonFile.js.map +0 -1
- package/src/lib/writeJsonFileSync.d.ts +0 -13
- package/src/lib/writeJsonFileSync.js +0 -22
- package/src/lib/writeJsonFileSync.js.map +0 -1
- /package/{src → cjs}/lib/types/ILogFileData.js +0 -0
- /package/{src → cjs}/lib/types/ILogFileData.js.map +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirectoryNamesPaths = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
|
+
/**
|
|
8
|
+
* Reads the names of all FSO's (files/directories/etc.) in a directory.
|
|
9
|
+
* Each FSO's full 'path' is available as a lazy-evaluated getter property on the returned object.
|
|
10
|
+
*
|
|
11
|
+
* @param dirpath - The path of the directory to read.
|
|
12
|
+
*/
|
|
13
|
+
async function readDirectoryNamesPaths(dirpath) {
|
|
14
|
+
return (await fs_extra_1.default.readdir(dirpath)).map((name) => {
|
|
15
|
+
return Object.defineProperty({ name }, 'path', {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get() {
|
|
18
|
+
return path_1.default.join(dirpath, this.name);
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
exports.readDirectoryNamesPaths = readDirectoryNamesPaths;
|
|
24
|
+
//# sourceMappingURL=readDirectoryNamesPaths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryNamesPaths.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryNamesPaths.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,wDAAuB;AAEvB;;;;;GAKG;AACI,KAAK,UAAU,uBAAuB,CAAC,OAAe;IAC3D,OAAO,CAAC,MAAM,kBAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QAC9C,OAAO,MAAM,CAAC,cAAc,CAAC,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE;YAC7C,UAAU,EAAE,IAAI;YAChB,GAAG;gBACD,OAAO,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;YACtC,CAAC;SACF,CAAyC,CAAA;IAC5C,CAAC,CAAC,CAAA;AACJ,CAAC;AATD,0DASC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads the names of all FSO's (files/directories/etc.) in a directory.
|
|
3
|
+
* Each FSO's full 'path' is available as a lazy-evaluated getter property on the returned object.
|
|
4
|
+
* If the directory does not exist, returns undefined.
|
|
5
|
+
*
|
|
6
|
+
* @param dirpath - The path of the directory to read.
|
|
7
|
+
*/
|
|
8
|
+
export declare function readDirectoryNamesPathsSafe(dirpath: string): Promise<Array<{
|
|
9
|
+
name: string;
|
|
10
|
+
get path(): string;
|
|
11
|
+
}> | undefined>;
|
|
12
|
+
//# sourceMappingURL=readDirectoryNamesPathsSafe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryNamesPathsSafe.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryNamesPathsSafe.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AAEH,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,IAAI,IAAI,MAAM,CAAA;CAAE,CAAC,GAAG,SAAS,CAAC,CAGlE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirectoryNamesPathsSafe = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
+
const readDirectoryNamesPaths_1 = require("./readDirectoryNamesPaths");
|
|
7
|
+
/**
|
|
8
|
+
* Reads the names of all FSO's (files/directories/etc.) in a directory.
|
|
9
|
+
* Each FSO's full 'path' is available as a lazy-evaluated getter property on the returned object.
|
|
10
|
+
* If the directory does not exist, returns undefined.
|
|
11
|
+
*
|
|
12
|
+
* @param dirpath - The path of the directory to read.
|
|
13
|
+
*/
|
|
14
|
+
async function readDirectoryNamesPathsSafe(dirpath) {
|
|
15
|
+
if (!(await fs_extra_1.default.pathExists(dirpath)))
|
|
16
|
+
return undefined;
|
|
17
|
+
return await (0, readDirectoryNamesPaths_1.readDirectoryNamesPaths)(dirpath);
|
|
18
|
+
}
|
|
19
|
+
exports.readDirectoryNamesPathsSafe = readDirectoryNamesPathsSafe;
|
|
20
|
+
//# sourceMappingURL=readDirectoryNamesPathsSafe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryNamesPathsSafe.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryNamesPathsSafe.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,uEAAmE;AAEnE;;;;;;GAMG;AAEI,KAAK,UAAU,2BAA2B,CAC/C,OAAe;IAEf,IAAI,CAAC,CAAC,MAAM,kBAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAAE,OAAO,SAAS,CAAA;IACrD,OAAO,MAAM,IAAA,iDAAuB,EAAC,OAAO,CAAC,CAAA;AAC/C,CAAC;AALD,kEAKC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads the names of all FSO's (files/directories/etc.) in a directory.
|
|
3
|
+
* Each FSO's full 'path' is available as a lazy-evaluated getter property on the returned object.
|
|
4
|
+
* If the directory does not exist, returns undefined.
|
|
5
|
+
*
|
|
6
|
+
* @param dirpath - The path of the directory to read.
|
|
7
|
+
*/
|
|
8
|
+
export declare function readDirectoryNamesPathsSafeSync(dirpath: string): Array<{
|
|
9
|
+
name: string;
|
|
10
|
+
get path(): string;
|
|
11
|
+
}> | undefined;
|
|
12
|
+
//# sourceMappingURL=readDirectoryNamesPathsSafeSync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryNamesPathsSafeSync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryNamesPathsSafeSync.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AAEH,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,MAAM,GACd,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,IAAI,IAAI,MAAM,CAAA;CAAE,CAAC,GAAG,SAAS,CAGzD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirectoryNamesPathsSafeSync = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
+
const readDirectoryNamesPathsSync_1 = require("./readDirectoryNamesPathsSync");
|
|
7
|
+
/**
|
|
8
|
+
* Reads the names of all FSO's (files/directories/etc.) in a directory.
|
|
9
|
+
* Each FSO's full 'path' is available as a lazy-evaluated getter property on the returned object.
|
|
10
|
+
* If the directory does not exist, returns undefined.
|
|
11
|
+
*
|
|
12
|
+
* @param dirpath - The path of the directory to read.
|
|
13
|
+
*/
|
|
14
|
+
function readDirectoryNamesPathsSafeSync(dirpath) {
|
|
15
|
+
if (!fs_extra_1.default.pathExistsSync(dirpath))
|
|
16
|
+
return undefined;
|
|
17
|
+
return (0, readDirectoryNamesPathsSync_1.readDirectoryNamesPathsSync)(dirpath);
|
|
18
|
+
}
|
|
19
|
+
exports.readDirectoryNamesPathsSafeSync = readDirectoryNamesPathsSafeSync;
|
|
20
|
+
//# sourceMappingURL=readDirectoryNamesPathsSafeSync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryNamesPathsSafeSync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryNamesPathsSafeSync.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,+EAA2E;AAE3E;;;;;;GAMG;AAEH,SAAgB,+BAA+B,CAC7C,OAAe;IAEf,IAAI,CAAC,kBAAE,CAAC,cAAc,CAAC,OAAO,CAAC;QAAE,OAAO,SAAS,CAAA;IACjD,OAAO,IAAA,yDAA2B,EAAC,OAAO,CAAC,CAAA;AAC7C,CAAC;AALD,0EAKC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads the names of all FSO's (files/directories/etc.) in a directory.
|
|
3
|
+
* Each FSO's full 'path' is available as a lazy-evaluated getter property on the returned object.
|
|
4
|
+
*
|
|
5
|
+
* @param dirpath - The path of the directory to read.
|
|
6
|
+
*/
|
|
7
|
+
export declare function readDirectoryNamesPathsSync(dirpath: string): Array<{
|
|
8
|
+
name: string;
|
|
9
|
+
get path(): string;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=readDirectoryNamesPathsSync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryNamesPathsSync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryNamesPathsSync.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,IAAI,IAAI,MAAM,CAAA;CAAE,CAAC,CASxG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirectoryNamesPathsSync = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
|
+
/**
|
|
8
|
+
* Reads the names of all FSO's (files/directories/etc.) in a directory.
|
|
9
|
+
* Each FSO's full 'path' is available as a lazy-evaluated getter property on the returned object.
|
|
10
|
+
*
|
|
11
|
+
* @param dirpath - The path of the directory to read.
|
|
12
|
+
*/
|
|
13
|
+
function readDirectoryNamesPathsSync(dirpath) {
|
|
14
|
+
return fs_extra_1.default.readdirSync(dirpath).map((name) => {
|
|
15
|
+
return Object.defineProperty({ name }, 'path', {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get() {
|
|
18
|
+
return path_1.default.join(dirpath, this.name);
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
exports.readDirectoryNamesPathsSync = readDirectoryNamesPathsSync;
|
|
24
|
+
//# sourceMappingURL=readDirectoryNamesPathsSync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryNamesPathsSync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryNamesPathsSync.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,wDAAuB;AAEvB;;;;;GAKG;AACH,SAAgB,2BAA2B,CAAC,OAAe;IACzD,OAAO,kBAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QAC1C,OAAO,MAAM,CAAC,cAAc,CAAC,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE;YAC7C,UAAU,EAAE,IAAI;YAChB,GAAG;gBACD,OAAO,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;YACtC,CAAC;SACF,CAAyC,CAAA;IAC5C,CAAC,CAAC,CAAA;AACJ,CAAC;AATD,kEASC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads the basenames of all FSO's (files/directories/etc.) in a directory.
|
|
3
|
+
* If the directory does not exist, returns undefined.
|
|
4
|
+
*
|
|
5
|
+
* @param dirpath - The path of the directory to read.
|
|
6
|
+
*/
|
|
7
|
+
export declare function readDirectoryNamesSafe(dirpath: string): Promise<string[] | undefined>;
|
|
8
|
+
//# sourceMappingURL=readDirectoryNamesSafe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryNamesSafe.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryNamesSafe.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,CAG3F"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirectoryNamesSafe = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
+
/**
|
|
7
|
+
* Reads the basenames of all FSO's (files/directories/etc.) in a directory.
|
|
8
|
+
* If the directory does not exist, returns undefined.
|
|
9
|
+
*
|
|
10
|
+
* @param dirpath - The path of the directory to read.
|
|
11
|
+
*/
|
|
12
|
+
async function readDirectoryNamesSafe(dirpath) {
|
|
13
|
+
if (!(await fs_extra_1.default.pathExists(dirpath)))
|
|
14
|
+
return undefined;
|
|
15
|
+
return await fs_extra_1.default.readdir(dirpath);
|
|
16
|
+
}
|
|
17
|
+
exports.readDirectoryNamesSafe = readDirectoryNamesSafe;
|
|
18
|
+
//# sourceMappingURL=readDirectoryNamesSafe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryNamesSafe.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryNamesSafe.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AAEzB;;;;;GAKG;AAEI,KAAK,UAAU,sBAAsB,CAAC,OAAe;IAC1D,IAAI,CAAC,CAAC,MAAM,kBAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAAE,OAAO,SAAS,CAAA;IACrD,OAAO,MAAM,kBAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;AAClC,CAAC;AAHD,wDAGC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads the basenames of all FSO's (files/directories/etc.) in a directory.
|
|
3
|
+
* If the directory does not exist, returns undefined.
|
|
4
|
+
*
|
|
5
|
+
* @param dirpath - The path of the directory to read.
|
|
6
|
+
*/
|
|
7
|
+
export declare function readDirectoryNamesSafeSync(dirpath: string): string[] | undefined;
|
|
8
|
+
//# sourceMappingURL=readDirectoryNamesSafeSync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryNamesSafeSync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryNamesSafeSync.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAGhF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirectoryNamesSafeSync = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
+
/**
|
|
7
|
+
* Reads the basenames of all FSO's (files/directories/etc.) in a directory.
|
|
8
|
+
* If the directory does not exist, returns undefined.
|
|
9
|
+
*
|
|
10
|
+
* @param dirpath - The path of the directory to read.
|
|
11
|
+
*/
|
|
12
|
+
function readDirectoryNamesSafeSync(dirpath) {
|
|
13
|
+
if (!fs_extra_1.default.pathExistsSync(dirpath))
|
|
14
|
+
return undefined;
|
|
15
|
+
return fs_extra_1.default.readdirSync(dirpath);
|
|
16
|
+
}
|
|
17
|
+
exports.readDirectoryNamesSafeSync = readDirectoryNamesSafeSync;
|
|
18
|
+
//# sourceMappingURL=readDirectoryNamesSafeSync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryNamesSafeSync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryNamesSafeSync.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AAEzB;;;;;GAKG;AAEH,SAAgB,0BAA0B,CAAC,OAAe;IACxD,IAAI,CAAC,kBAAE,CAAC,cAAc,CAAC,OAAO,CAAC;QAAE,OAAO,SAAS,CAAA;IACjD,OAAO,kBAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;AAChC,CAAC;AAHD,gEAGC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads the basenames of all FSO's (files/directories/etc.) in a directory.
|
|
3
|
+
*
|
|
4
|
+
* @param dirpath - The path of the directory to read.
|
|
5
|
+
*/
|
|
6
|
+
export declare function readDirectoryNamesSync(dirpath: string): string[];
|
|
7
|
+
//# sourceMappingURL=readDirectoryNamesSync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryNamesSync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryNamesSync.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAEhE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirectoryNamesSync = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
+
/**
|
|
7
|
+
* Reads the basenames of all FSO's (files/directories/etc.) in a directory.
|
|
8
|
+
*
|
|
9
|
+
* @param dirpath - The path of the directory to read.
|
|
10
|
+
*/
|
|
11
|
+
function readDirectoryNamesSync(dirpath) {
|
|
12
|
+
return fs_extra_1.default.readdirSync(dirpath);
|
|
13
|
+
}
|
|
14
|
+
exports.readDirectoryNamesSync = readDirectoryNamesSync;
|
|
15
|
+
//# sourceMappingURL=readDirectoryNamesSync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryNamesSync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryNamesSync.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AAEzB;;;;GAIG;AACH,SAAgB,sBAAsB,CAAC,OAAe;IACpD,OAAO,kBAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;AAChC,CAAC;AAFD,wDAEC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads the paths to all FSO's (files/directories/etc.) in a directory.
|
|
3
|
+
*
|
|
4
|
+
* @param dirpath - The path of the directory to read.
|
|
5
|
+
*/
|
|
6
|
+
export declare function readDirectoryPaths(dirpath: string): Promise<string[]>;
|
|
7
|
+
//# sourceMappingURL=readDirectoryPaths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryPaths.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryPaths.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAI3E"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirectoryPaths = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
|
+
/**
|
|
8
|
+
* Reads the paths to all FSO's (files/directories/etc.) in a directory.
|
|
9
|
+
*
|
|
10
|
+
* @param dirpath - The path of the directory to read.
|
|
11
|
+
*/
|
|
12
|
+
async function readDirectoryPaths(dirpath) {
|
|
13
|
+
return (await fs_extra_1.default.readdir(dirpath)).map((name) => {
|
|
14
|
+
return path_1.default.join(dirpath, name);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
exports.readDirectoryPaths = readDirectoryPaths;
|
|
18
|
+
//# sourceMappingURL=readDirectoryPaths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryPaths.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryPaths.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,wDAAuB;AAEvB;;;;GAIG;AACI,KAAK,UAAU,kBAAkB,CAAC,OAAe;IACtD,OAAO,CAAC,MAAM,kBAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QAC9C,OAAO,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;IACjC,CAAC,CAAC,CAAA;AACJ,CAAC;AAJD,gDAIC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads the paths to all FSO's (files/directories/etc.) in a directory.
|
|
3
|
+
* If the directory does not exist, returns undefined.
|
|
4
|
+
*
|
|
5
|
+
* @param dirpath - The path of the directory to read.
|
|
6
|
+
*/
|
|
7
|
+
export declare function readDirectoryPathsSafe(dirpath: string): Promise<string[] | undefined>;
|
|
8
|
+
//# sourceMappingURL=readDirectoryPathsSafe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryPathsSafe.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryPathsSafe.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,CAG3F"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirectoryPathsSafe = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
+
const readDirectoryPaths_1 = require("./readDirectoryPaths");
|
|
7
|
+
/**
|
|
8
|
+
* Reads the paths to all FSO's (files/directories/etc.) in a directory.
|
|
9
|
+
* If the directory does not exist, returns undefined.
|
|
10
|
+
*
|
|
11
|
+
* @param dirpath - The path of the directory to read.
|
|
12
|
+
*/
|
|
13
|
+
async function readDirectoryPathsSafe(dirpath) {
|
|
14
|
+
if (!(await fs_extra_1.default.pathExists(dirpath)))
|
|
15
|
+
return undefined;
|
|
16
|
+
return await (0, readDirectoryPaths_1.readDirectoryPaths)(dirpath);
|
|
17
|
+
}
|
|
18
|
+
exports.readDirectoryPathsSafe = readDirectoryPathsSafe;
|
|
19
|
+
//# sourceMappingURL=readDirectoryPathsSafe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryPathsSafe.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryPathsSafe.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,6DAAyD;AAEzD;;;;;GAKG;AACI,KAAK,UAAU,sBAAsB,CAAC,OAAe;IAC1D,IAAI,CAAC,CAAC,MAAM,kBAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAAE,OAAO,SAAS,CAAA;IACrD,OAAO,MAAM,IAAA,uCAAkB,EAAC,OAAO,CAAC,CAAA;AAC1C,CAAC;AAHD,wDAGC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads the paths to all FSO's (files/directories/etc.) in a directory.
|
|
3
|
+
* If the directory does not exist, returns undefined.
|
|
4
|
+
*
|
|
5
|
+
* @param dirpath - The path of the directory to read.
|
|
6
|
+
*/
|
|
7
|
+
export declare function readDirectoryPathsSafeSync(dirpath: string): string[] | undefined;
|
|
8
|
+
//# sourceMappingURL=readDirectoryPathsSafeSync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryPathsSafeSync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryPathsSafeSync.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAGhF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirectoryPathsSafeSync = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
+
const readDirectoryPathsSync_1 = require("./readDirectoryPathsSync");
|
|
7
|
+
/**
|
|
8
|
+
* Reads the paths to all FSO's (files/directories/etc.) in a directory.
|
|
9
|
+
* If the directory does not exist, returns undefined.
|
|
10
|
+
*
|
|
11
|
+
* @param dirpath - The path of the directory to read.
|
|
12
|
+
*/
|
|
13
|
+
function readDirectoryPathsSafeSync(dirpath) {
|
|
14
|
+
if (!fs_extra_1.default.pathExistsSync(dirpath))
|
|
15
|
+
return undefined;
|
|
16
|
+
return (0, readDirectoryPathsSync_1.readDirectoryPathsSync)(dirpath);
|
|
17
|
+
}
|
|
18
|
+
exports.readDirectoryPathsSafeSync = readDirectoryPathsSafeSync;
|
|
19
|
+
//# sourceMappingURL=readDirectoryPathsSafeSync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryPathsSafeSync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryPathsSafeSync.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,qEAAiE;AAEjE;;;;;GAKG;AACH,SAAgB,0BAA0B,CAAC,OAAe;IACxD,IAAI,CAAC,kBAAE,CAAC,cAAc,CAAC,OAAO,CAAC;QAAE,OAAO,SAAS,CAAA;IACjD,OAAO,IAAA,+CAAsB,EAAC,OAAO,CAAC,CAAA;AACxC,CAAC;AAHD,gEAGC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads the paths to all FSO's (files/directories/etc.) in a directory.
|
|
3
|
+
*
|
|
4
|
+
* @param dirpath - The path of the directory to read.
|
|
5
|
+
*/
|
|
6
|
+
export declare function readDirectoryPathsSync(dirpath: string): string[];
|
|
7
|
+
//# sourceMappingURL=readDirectoryPathsSync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryPathsSync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryPathsSync.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAIhE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirectoryPathsSync = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
|
+
/**
|
|
8
|
+
* Reads the paths to all FSO's (files/directories/etc.) in a directory.
|
|
9
|
+
*
|
|
10
|
+
* @param dirpath - The path of the directory to read.
|
|
11
|
+
*/
|
|
12
|
+
function readDirectoryPathsSync(dirpath) {
|
|
13
|
+
return fs_extra_1.default.readdirSync(dirpath).map((name) => {
|
|
14
|
+
return path_1.default.join(dirpath, name);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
exports.readDirectoryPathsSync = readDirectoryPathsSync;
|
|
18
|
+
//# sourceMappingURL=readDirectoryPathsSync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryPathsSync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryPathsSync.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,wDAAuB;AAEvB;;;;GAIG;AACH,SAAgB,sBAAsB,CAAC,OAAe;IACpD,OAAO,kBAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QAC1C,OAAO,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;IACjC,CAAC,CAAC,CAAA;AACJ,CAAC;AAJD,wDAIC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import fs from 'fs-extra';
|
|
3
|
+
/**
|
|
4
|
+
* Reads a fs.Stats of all FSO's (files/directories/etc.) in a directory.
|
|
5
|
+
* Each FSO's 'name' and full 'path' are available as lazy-evaluated getter properties on the returned Stats object.
|
|
6
|
+
*
|
|
7
|
+
* @param dirpath - The path of the directory to read.
|
|
8
|
+
*/
|
|
9
|
+
export declare function readDirectoryStats(dirpath: string): Promise<Array<fs.Stats & {
|
|
10
|
+
name: string;
|
|
11
|
+
get path(): string;
|
|
12
|
+
}>>;
|
|
13
|
+
//# sourceMappingURL=readDirectoryStats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryStats.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryStats.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AAGzB;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,IAAI,IAAI,MAAM,CAAA;CAAE,CAAC,CAAC,CAkBjE"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirectoryStats = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
|
+
/**
|
|
8
|
+
* Reads a fs.Stats of all FSO's (files/directories/etc.) in a directory.
|
|
9
|
+
* Each FSO's 'name' and full 'path' are available as lazy-evaluated getter properties on the returned Stats object.
|
|
10
|
+
*
|
|
11
|
+
* @param dirpath - The path of the directory to read.
|
|
12
|
+
*/
|
|
13
|
+
async function readDirectoryStats(dirpath) {
|
|
14
|
+
const names = await fs_extra_1.default.readdir(dirpath);
|
|
15
|
+
const promises = names.map(async (name) => {
|
|
16
|
+
const stats = await fs_extra_1.default.stat(path_1.default.join(dirpath, name));
|
|
17
|
+
return Object.defineProperties(stats, {
|
|
18
|
+
name: {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
value: name,
|
|
21
|
+
},
|
|
22
|
+
path: {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get() {
|
|
25
|
+
return path_1.default.join(dirpath, this.name);
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
return await Promise.all(promises);
|
|
31
|
+
}
|
|
32
|
+
exports.readDirectoryStats = readDirectoryStats;
|
|
33
|
+
//# sourceMappingURL=readDirectoryStats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryStats.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryStats.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,wDAAuB;AAEvB;;;;;GAKG;AACI,KAAK,UAAU,kBAAkB,CACtC,OAAe;IAEf,MAAM,KAAK,GAAG,MAAM,kBAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IACvC,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QACxC,MAAM,KAAK,GAAG,MAAM,kBAAE,CAAC,IAAI,CAAC,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAA;QACrD,OAAO,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE;YACpC,IAAI,EAAE;gBACJ,UAAU,EAAE,IAAI;gBAChB,KAAK,EAAE,IAAI;aACZ;YACD,IAAI,EAAE;gBACJ,UAAU,EAAE,IAAI;gBAChB,GAAG;oBACD,OAAO,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;gBACtC,CAAC;aACF;SACF,CAAoD,CAAA;IACvD,CAAC,CAAC,CAAA;IACF,OAAO,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;AACpC,CAAC;AApBD,gDAoBC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import fs from 'fs-extra';
|
|
3
|
+
/**
|
|
4
|
+
* Reads a fs.Stats of all FSO's (files/directories/etc.) in a directory.
|
|
5
|
+
* Each FSO's 'name' and full 'path' are available as lazy-evaluated getter properties on the returned Stats object.
|
|
6
|
+
* If the directory does not exist, returns undefined.
|
|
7
|
+
*
|
|
8
|
+
* @param dirpath - The path of the directory to read.
|
|
9
|
+
*/
|
|
10
|
+
export declare function readDirectoryStatsSafe(dirpath: string): Promise<Array<fs.Stats & {
|
|
11
|
+
name: string;
|
|
12
|
+
get path(): string;
|
|
13
|
+
}> | undefined>;
|
|
14
|
+
//# sourceMappingURL=readDirectoryStatsSafe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryStatsSafe.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryStatsSafe.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AAGzB;;;;;;GAMG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,IAAI,IAAI,MAAM,CAAA;CAAE,CAAC,GAAG,SAAS,CAAC,CAG7E"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirectoryStatsSafe = 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
|
+
* Reads a fs.Stats of all FSO's (files/directories/etc.) in a directory.
|
|
9
|
+
* Each FSO's 'name' and full 'path' are available as lazy-evaluated getter properties on the returned Stats object.
|
|
10
|
+
* If the directory does not exist, returns undefined.
|
|
11
|
+
*
|
|
12
|
+
* @param dirpath - The path of the directory to read.
|
|
13
|
+
*/
|
|
14
|
+
async function readDirectoryStatsSafe(dirpath) {
|
|
15
|
+
if (!(await fs_extra_1.default.pathExists(dirpath)))
|
|
16
|
+
return undefined;
|
|
17
|
+
return await (0, readDirectoryStats_1.readDirectoryStats)(dirpath);
|
|
18
|
+
}
|
|
19
|
+
exports.readDirectoryStatsSafe = readDirectoryStatsSafe;
|
|
20
|
+
//# sourceMappingURL=readDirectoryStatsSafe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryStatsSafe.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryStatsSafe.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,6DAAyD;AAEzD;;;;;;GAMG;AACI,KAAK,UAAU,sBAAsB,CAC1C,OAAe;IAEf,IAAI,CAAC,CAAC,MAAM,kBAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAAE,OAAO,SAAS,CAAA;IACrD,OAAO,MAAM,IAAA,uCAAkB,EAAC,OAAO,CAAC,CAAA;AAC1C,CAAC;AALD,wDAKC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import fs from 'fs-extra';
|
|
3
|
+
/**
|
|
4
|
+
* Reads a fs.Stats of all FSO's (files/directories/etc.) in a directory.
|
|
5
|
+
* Each FSO's 'name' and full 'path' are available as lazy-evaluated getter properties on the returned Stats object.
|
|
6
|
+
* If the directory does not exist, returns undefined.
|
|
7
|
+
*
|
|
8
|
+
* @param dirpath - The path of the directory to read.
|
|
9
|
+
*/
|
|
10
|
+
export declare function readDirectoryStatsSafeSync(dirpath: string): Array<fs.Stats & {
|
|
11
|
+
name: string;
|
|
12
|
+
get path(): string;
|
|
13
|
+
}> | undefined;
|
|
14
|
+
//# sourceMappingURL=readDirectoryStatsSafeSync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryStatsSafeSync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryStatsSafeSync.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AAGzB;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,GACd,KAAK,CAAC,EAAE,CAAC,KAAK,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,IAAI,IAAI,MAAM,CAAA;CAAE,CAAC,GAAG,SAAS,CAGpE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirectoryStatsSafeSync = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
+
const readDirectoryStatsSync_1 = require("./readDirectoryStatsSync");
|
|
7
|
+
/**
|
|
8
|
+
* Reads a fs.Stats of all FSO's (files/directories/etc.) in a directory.
|
|
9
|
+
* Each FSO's 'name' and full 'path' are available as lazy-evaluated getter properties on the returned Stats object.
|
|
10
|
+
* If the directory does not exist, returns undefined.
|
|
11
|
+
*
|
|
12
|
+
* @param dirpath - The path of the directory to read.
|
|
13
|
+
*/
|
|
14
|
+
function readDirectoryStatsSafeSync(dirpath) {
|
|
15
|
+
if (!fs_extra_1.default.pathExistsSync(dirpath))
|
|
16
|
+
return undefined;
|
|
17
|
+
return (0, readDirectoryStatsSync_1.readDirectoryStatsSync)(dirpath);
|
|
18
|
+
}
|
|
19
|
+
exports.readDirectoryStatsSafeSync = readDirectoryStatsSafeSync;
|
|
20
|
+
//# sourceMappingURL=readDirectoryStatsSafeSync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryStatsSafeSync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryStatsSafeSync.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,qEAAiE;AAEjE;;;;;;GAMG;AACH,SAAgB,0BAA0B,CACxC,OAAe;IAEf,IAAI,CAAC,kBAAE,CAAC,cAAc,CAAC,OAAO,CAAC;QAAE,OAAO,SAAS,CAAA;IACjD,OAAO,IAAA,+CAAsB,EAAC,OAAO,CAAC,CAAA;AACxC,CAAC;AALD,gEAKC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import fs from 'fs-extra';
|
|
3
|
+
/**
|
|
4
|
+
* Reads a fs.Stats of all FSO's (files/directories/etc.) in a directory.
|
|
5
|
+
* Each FSO's 'name' and full 'path' are available as lazy-evaluated getter properties on the returned Stats object.
|
|
6
|
+
*
|
|
7
|
+
* @param dirpath - The path of the directory to read.
|
|
8
|
+
*/
|
|
9
|
+
export declare function readDirectoryStatsSync(dirpath: string): Array<fs.Stats & {
|
|
10
|
+
name: string;
|
|
11
|
+
get path(): string;
|
|
12
|
+
}>;
|
|
13
|
+
//# sourceMappingURL=readDirectoryStatsSync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryStatsSync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryStatsSync.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AAGzB;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC,EAAE,CAAC,KAAK,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,IAAI,IAAI,MAAM,CAAA;CAAE,CAAC,CAiB9G"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirectoryStatsSync = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
|
+
/**
|
|
8
|
+
* Reads a fs.Stats of all FSO's (files/directories/etc.) in a directory.
|
|
9
|
+
* Each FSO's 'name' and full 'path' are available as lazy-evaluated getter properties on the returned Stats object.
|
|
10
|
+
*
|
|
11
|
+
* @param dirpath - The path of the directory to read.
|
|
12
|
+
*/
|
|
13
|
+
function readDirectoryStatsSync(dirpath) {
|
|
14
|
+
const names = fs_extra_1.default.readdirSync(dirpath);
|
|
15
|
+
return names.map((name) => {
|
|
16
|
+
const stats = fs_extra_1.default.statSync(path_1.default.join(dirpath, name));
|
|
17
|
+
return Object.defineProperties(stats, {
|
|
18
|
+
name: {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
value: name,
|
|
21
|
+
},
|
|
22
|
+
path: {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get() {
|
|
25
|
+
return path_1.default.join(dirpath, this.name);
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
exports.readDirectoryStatsSync = readDirectoryStatsSync;
|
|
32
|
+
//# sourceMappingURL=readDirectoryStatsSync.js.map
|