@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 @@
|
|
|
1
|
+
{"version":3,"file":"promptUserEditInTextEditor.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/promptUserEditInTextEditor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAA;AAKvF;;;;;;GAMG;AACH,wBAAsB,0BAA0B,CAAC,OAAO,GAAE,8BAAmC,GAAG,OAAO,CAAC,MAAM,CAAC,CAU9G"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.promptUserEditInTextEditor = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const util_1 = tslib_1.__importDefault(require("util"));
|
|
6
|
+
const child_process_1 = require("child_process");
|
|
7
|
+
const readFile_1 = require("./readFile");
|
|
8
|
+
const tempFile_1 = require("./tempFile");
|
|
9
|
+
const writeFile_1 = require("./writeFile");
|
|
10
|
+
/**
|
|
11
|
+
* Prompts the user to edit a string in the user's text editor.
|
|
12
|
+
*
|
|
13
|
+
* @example ```ts
|
|
14
|
+
* promptUserEditInTextEditor({ editor: 'notepad' }).then(console.log)
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
async function promptUserEditInTextEditor(options = {}) {
|
|
18
|
+
const content = options.content ?? '';
|
|
19
|
+
let extension = options.extension ?? '.txt';
|
|
20
|
+
extension = extension.startsWith('.') ? extension : '.' + extension;
|
|
21
|
+
const editor = options.editor ?? 'code -w'; //defaultOpenInEditorCommand()
|
|
22
|
+
return await (0, tempFile_1.tempFile)(extension, async (tempfile) => {
|
|
23
|
+
await (0, writeFile_1.writeFile)(tempfile, content);
|
|
24
|
+
await util_1.default.promisify(child_process_1.exec)(`${editor} ${tempfile}`);
|
|
25
|
+
return await (0, readFile_1.readFile)(tempfile);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
exports.promptUserEditInTextEditor = promptUserEditInTextEditor;
|
|
29
|
+
//# sourceMappingURL=promptUserEditInTextEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promptUserEditInTextEditor.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/promptUserEditInTextEditor.ts"],"names":[],"mappings":";;;;AAAA,wDAAuB;AACvB,iDAAoC;AAEpC,yCAAqC;AACrC,yCAAqC;AACrC,2CAAuC;AAEvC;;;;;;GAMG;AACI,KAAK,UAAU,0BAA0B,CAAC,UAA0C,EAAE;IAC3F,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAA;IACrC,IAAI,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,MAAM,CAAA;IAC3C,SAAS,GAAG,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,GAAG,SAAS,CAAA;IACnE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,SAAS,CAAA,CAAC,8BAA8B;IACzE,OAAO,MAAM,IAAA,mBAAQ,EAAC,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;QAClD,MAAM,IAAA,qBAAS,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;QAClC,MAAM,cAAI,CAAC,SAAS,CAAC,oBAAI,CAAC,CAAC,GAAG,MAAM,IAAI,QAAQ,EAAE,CAAC,CAAA;QACnD,OAAO,MAAM,IAAA,mBAAQ,EAAC,QAAQ,CAAC,CAAA;IACjC,CAAC,CAAC,CAAA;AACJ,CAAC;AAVD,gEAUC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IGetUserInputFromEditorOptions } from './types/IGetUserInputFromEditorOptions';
|
|
2
|
+
/**
|
|
3
|
+
* Prompts the user to edit a string in the user's text editor.
|
|
4
|
+
*
|
|
5
|
+
* @example ```ts
|
|
6
|
+
* promptUserEditInTextEditor({ editor: 'notepad' })
|
|
7
|
+
* ```
|
|
8
|
+
*/
|
|
9
|
+
export declare function promptUserEditInTextEditorSync(options?: IGetUserInputFromEditorOptions): string;
|
|
10
|
+
//# sourceMappingURL=promptUserEditInTextEditorSync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promptUserEditInTextEditorSync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/promptUserEditInTextEditorSync.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAA;AAKvF;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,GAAE,8BAAmC,GAAG,MAAM,CAUnG"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.promptUserEditInTextEditorSync = void 0;
|
|
4
|
+
const child_process_1 = require("child_process");
|
|
5
|
+
const readFileSync_1 = require("./readFileSync");
|
|
6
|
+
const tempFileSync_1 = require("./tempFileSync");
|
|
7
|
+
const writeFileSync_1 = require("./writeFileSync");
|
|
8
|
+
/**
|
|
9
|
+
* Prompts the user to edit a string in the user's text editor.
|
|
10
|
+
*
|
|
11
|
+
* @example ```ts
|
|
12
|
+
* promptUserEditInTextEditor({ editor: 'notepad' })
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
function promptUserEditInTextEditorSync(options = {}) {
|
|
16
|
+
const content = options.content ?? '';
|
|
17
|
+
let extension = options.extension ?? '.txt';
|
|
18
|
+
extension = extension.startsWith('.') ? extension : '.' + extension;
|
|
19
|
+
const editor = options.editor ?? 'code -w'; //defaultOpenInEditorCommand()
|
|
20
|
+
return (0, tempFileSync_1.tempFileSync)(extension, (tempfile) => {
|
|
21
|
+
(0, writeFileSync_1.writeFileSync)(tempfile, content);
|
|
22
|
+
(0, child_process_1.execSync)(`${editor} ${tempfile}`, { stdio: 'inherit' });
|
|
23
|
+
return (0, readFileSync_1.readFileSync)(tempfile);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
exports.promptUserEditInTextEditorSync = promptUserEditInTextEditorSync;
|
|
27
|
+
//# sourceMappingURL=promptUserEditInTextEditorSync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promptUserEditInTextEditorSync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/promptUserEditInTextEditorSync.ts"],"names":[],"mappings":";;;AAAA,iDAAwC;AAExC,iDAA6C;AAC7C,iDAA6C;AAC7C,mDAA+C;AAE/C;;;;;;GAMG;AACH,SAAgB,8BAA8B,CAAC,UAA0C,EAAE;IACzF,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAA;IACrC,IAAI,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,MAAM,CAAA;IAC3C,SAAS,GAAG,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,GAAG,SAAS,CAAA;IACnE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,SAAS,CAAA,CAAC,8BAA8B;IACzE,OAAO,IAAA,2BAAY,EAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,EAAE;QAC1C,IAAA,6BAAa,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;QAChC,IAAA,wBAAQ,EAAC,GAAG,MAAM,IAAI,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAA;QACvD,OAAO,IAAA,2BAAY,EAAC,QAAQ,CAAC,CAAA;IAC/B,CAAC,CAAC,CAAA;AACJ,CAAC;AAVD,wEAUC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Edit a JSON-stringify-compatible value in the user's editor and return the (JSON.parse'd) result.
|
|
3
|
+
*
|
|
4
|
+
* @param value - The value to edit (NOT a json string). Defaults to an empty object.
|
|
5
|
+
* @param editor - Launch command to start your editor. Defaults to VSCode: 'code -w' (if installed).
|
|
6
|
+
* - Otherwise this logic: isWindows() ? 'notepad' : isOSX() ? 'open vi' : 'xdg-open'
|
|
7
|
+
*
|
|
8
|
+
* @example ```ts
|
|
9
|
+
* promptUserEditJsonInTextEditor([1, 2]).then(console.log)
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export declare function promptUserEditJsonInTextEditor<T = any, R extends T = T>(value?: T, editor?: string): Promise<R>;
|
|
13
|
+
//# sourceMappingURL=promptUserEditJsonInTextEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promptUserEditJsonInTextEditor.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/promptUserEditJsonInTextEditor.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,wBAAsB,8BAA8B,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,EAC3E,KAAK,GAAE,CAAW,EAClB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,CAAC,CAAC,CAOZ"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.promptUserEditJsonInTextEditor = void 0;
|
|
4
|
+
const promptUserEditInTextEditor_1 = require("./promptUserEditInTextEditor");
|
|
5
|
+
/**
|
|
6
|
+
* Edit a JSON-stringify-compatible value in the user's editor and return the (JSON.parse'd) result.
|
|
7
|
+
*
|
|
8
|
+
* @param value - The value to edit (NOT a json string). Defaults to an empty object.
|
|
9
|
+
* @param editor - Launch command to start your editor. Defaults to VSCode: 'code -w' (if installed).
|
|
10
|
+
* - Otherwise this logic: isWindows() ? 'notepad' : isOSX() ? 'open vi' : 'xdg-open'
|
|
11
|
+
*
|
|
12
|
+
* @example ```ts
|
|
13
|
+
* promptUserEditJsonInTextEditor([1, 2]).then(console.log)
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
async function promptUserEditJsonInTextEditor(value = {}, editor) {
|
|
17
|
+
const json = await (0, promptUserEditInTextEditor_1.promptUserEditInTextEditor)({
|
|
18
|
+
editor,
|
|
19
|
+
content: JSON.stringify(value, null, 2),
|
|
20
|
+
extension: '.json',
|
|
21
|
+
});
|
|
22
|
+
return JSON.parse(json);
|
|
23
|
+
}
|
|
24
|
+
exports.promptUserEditJsonInTextEditor = promptUserEditJsonInTextEditor;
|
|
25
|
+
//# sourceMappingURL=promptUserEditJsonInTextEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promptUserEditJsonInTextEditor.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/promptUserEditJsonInTextEditor.ts"],"names":[],"mappings":";;;AAAA,6EAAyE;AAEzE;;;;;;;;;;GAUG;AACI,KAAK,UAAU,8BAA8B,CAClD,QAAW,EAAO,EAClB,MAAe;IAEf,MAAM,IAAI,GAAG,MAAM,IAAA,uDAA0B,EAAC;QAC5C,MAAM;QACN,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACvC,SAAS,EAAE,OAAO;KACnB,CAAC,CAAA;IACF,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAM,CAAA;AAC9B,CAAC;AAVD,wEAUC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Edit a JSON-stringify-compatible value in the user's editor and return the (JSON.parse'd) result.
|
|
3
|
+
*
|
|
4
|
+
* @param value - The value to edit (NOT a json string). Defaults to an empty object.
|
|
5
|
+
* @param editor - Launch command to start your editor. Defaults to VSCode: 'code -w' (if installed).
|
|
6
|
+
* - Otherwise this logic: isWindows() ? 'notepad' : isOSX() ? 'open vi' : 'xdg-open'
|
|
7
|
+
*
|
|
8
|
+
* @example ```ts
|
|
9
|
+
* promptUserEditJsonInTextEditorSync([1, 2])
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export declare function promptUserEditJsonInTextEditorSync<T = any, R extends T = T>(value?: T, editor?: string): R;
|
|
13
|
+
//# sourceMappingURL=promptUserEditJsonInTextEditorSync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promptUserEditJsonInTextEditorSync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/promptUserEditJsonInTextEditorSync.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,wBAAgB,kCAAkC,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,KAAK,GAAE,CAAW,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,CAAC,CAOnH"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.promptUserEditJsonInTextEditorSync = void 0;
|
|
4
|
+
const promptUserEditInTextEditorSync_1 = require("./promptUserEditInTextEditorSync");
|
|
5
|
+
/**
|
|
6
|
+
* Edit a JSON-stringify-compatible value in the user's editor and return the (JSON.parse'd) result.
|
|
7
|
+
*
|
|
8
|
+
* @param value - The value to edit (NOT a json string). Defaults to an empty object.
|
|
9
|
+
* @param editor - Launch command to start your editor. Defaults to VSCode: 'code -w' (if installed).
|
|
10
|
+
* - Otherwise this logic: isWindows() ? 'notepad' : isOSX() ? 'open vi' : 'xdg-open'
|
|
11
|
+
*
|
|
12
|
+
* @example ```ts
|
|
13
|
+
* promptUserEditJsonInTextEditorSync([1, 2])
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
function promptUserEditJsonInTextEditorSync(value = {}, editor) {
|
|
17
|
+
const json = (0, promptUserEditInTextEditorSync_1.promptUserEditInTextEditorSync)({
|
|
18
|
+
editor,
|
|
19
|
+
content: JSON.stringify(value, null, 2),
|
|
20
|
+
extension: '.json',
|
|
21
|
+
});
|
|
22
|
+
return JSON.parse(json);
|
|
23
|
+
}
|
|
24
|
+
exports.promptUserEditJsonInTextEditorSync = promptUserEditJsonInTextEditorSync;
|
|
25
|
+
//# sourceMappingURL=promptUserEditJsonInTextEditorSync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promptUserEditJsonInTextEditorSync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/promptUserEditJsonInTextEditorSync.ts"],"names":[],"mappings":";;;AAAA,qFAAiF;AAEjF;;;;;;;;;;GAUG;AACH,SAAgB,kCAAkC,CAA2B,QAAW,EAAO,EAAE,MAAe;IAC9G,MAAM,IAAI,GAAG,IAAA,+DAA8B,EAAC;QAC1C,MAAM;QACN,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACvC,SAAS,EAAE,OAAO;KACnB,CAAC,CAAA;IACF,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAM,CAAA;AAC9B,CAAC;AAPD,gFAOC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import fs from 'fs-extra';
|
|
3
|
+
/**
|
|
4
|
+
* Reads a fs.Dirent of all FSO's (files/directories/etc.) in a directory.
|
|
5
|
+
*
|
|
6
|
+
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
7
|
+
*
|
|
8
|
+
* @param dirpath - The path of the directory to read.
|
|
9
|
+
*/
|
|
10
|
+
export declare function readDirectoryDirents(dirpath: string): Promise<fs.Dirent[]>;
|
|
11
|
+
//# sourceMappingURL=readDirectoryDirents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryDirents.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirents.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AAEzB;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAEhF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirectoryDirents = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
+
/**
|
|
7
|
+
* Reads a fs.Dirent of all FSO's (files/directories/etc.) in a directory.
|
|
8
|
+
*
|
|
9
|
+
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
10
|
+
*
|
|
11
|
+
* @param dirpath - The path of the directory to read.
|
|
12
|
+
*/
|
|
13
|
+
async function readDirectoryDirents(dirpath) {
|
|
14
|
+
return await fs_extra_1.default.readdir(dirpath, { withFileTypes: true });
|
|
15
|
+
}
|
|
16
|
+
exports.readDirectoryDirents = readDirectoryDirents;
|
|
17
|
+
//# sourceMappingURL=readDirectoryDirents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryDirents.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirents.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AAEzB;;;;;;GAMG;AACI,KAAK,UAAU,oBAAoB,CAAC,OAAe;IACxD,OAAO,MAAM,kBAAE,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;AAC3D,CAAC;AAFD,oDAEC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import fs from 'fs-extra';
|
|
3
|
+
/**
|
|
4
|
+
* Reads a fs.Dirent of all FSO's (files/directories/etc.) in a directory.
|
|
5
|
+
* Each FSO's full 'path' is available as a lazy-evaluated getter property on the returned Dirent object.
|
|
6
|
+
*
|
|
7
|
+
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
8
|
+
*
|
|
9
|
+
* @param dirpath - The path of the directory to read.
|
|
10
|
+
*/
|
|
11
|
+
export declare function readDirectoryDirentsPaths(dirpath: string): Promise<Array<fs.Dirent & {
|
|
12
|
+
get path(): string;
|
|
13
|
+
}>>;
|
|
14
|
+
//# sourceMappingURL=readDirectoryDirentsPaths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryDirentsPaths.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirentsPaths.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AAGzB;;;;;;;GAOG;AACH,wBAAsB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG;IAAE,IAAI,IAAI,IAAI,MAAM,CAAA;CAAE,CAAC,CAAC,CAUnH"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirectoryDirentsPaths = 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.Dirent 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 Dirent object.
|
|
10
|
+
*
|
|
11
|
+
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
12
|
+
*
|
|
13
|
+
* @param dirpath - The path of the directory to read.
|
|
14
|
+
*/
|
|
15
|
+
async function readDirectoryDirentsPaths(dirpath) {
|
|
16
|
+
const dirents = await fs_extra_1.default.readdir(dirpath, { withFileTypes: true });
|
|
17
|
+
return dirents.map((dirent) => {
|
|
18
|
+
return Object.defineProperty(dirent, 'path', {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get() {
|
|
21
|
+
return path_1.default.join(dirpath, this.name);
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
exports.readDirectoryDirentsPaths = readDirectoryDirentsPaths;
|
|
27
|
+
//# sourceMappingURL=readDirectoryDirentsPaths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryDirentsPaths.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirentsPaths.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,wDAAuB;AAEvB;;;;;;;GAOG;AACI,KAAK,UAAU,yBAAyB,CAAC,OAAe;IAC7D,MAAM,OAAO,GAAG,MAAM,kBAAE,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;IAClE,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QAC5B,OAAO,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE;YAC3C,UAAU,EAAE,IAAI;YAChB,GAAG;gBACD,OAAO,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;YACtC,CAAC;SACF,CAAuC,CAAA;IAC1C,CAAC,CAAC,CAAA;AACJ,CAAC;AAVD,8DAUC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import fs from 'fs-extra';
|
|
3
|
+
/**
|
|
4
|
+
* Reads a fs.Dirent of all FSO's (files/directories/etc.) in a directory.
|
|
5
|
+
* Each FSO's full 'path' is available as a lazy-evaluated getter property on the returned Dirent object.
|
|
6
|
+
* If the directory does not exist, returns undefined-
|
|
7
|
+
*
|
|
8
|
+
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
9
|
+
*
|
|
10
|
+
* @param dirpath - The path of the directory to read.
|
|
11
|
+
*/
|
|
12
|
+
export declare function readDirectoryDirentsPathsSafe(dirpath: string): Promise<Array<fs.Dirent & {
|
|
13
|
+
get path(): string;
|
|
14
|
+
}> | undefined>;
|
|
15
|
+
//# sourceMappingURL=readDirectoryDirentsPathsSafe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryDirentsPathsSafe.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirentsPathsSafe.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AAGzB;;;;;;;;GAQG;AAEH,wBAAsB,6BAA6B,CACjD,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG;IAAE,IAAI,IAAI,IAAI,MAAM,CAAA;CAAE,CAAC,GAAG,SAAS,CAAC,CAGhE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirectoryDirentsPathsSafe = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
+
const readDirectoryDirentsPaths_1 = require("./readDirectoryDirentsPaths");
|
|
7
|
+
/**
|
|
8
|
+
* Reads a fs.Dirent 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 Dirent object.
|
|
10
|
+
* If the directory does not exist, returns undefined-
|
|
11
|
+
*
|
|
12
|
+
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
13
|
+
*
|
|
14
|
+
* @param dirpath - The path of the directory to read.
|
|
15
|
+
*/
|
|
16
|
+
async function readDirectoryDirentsPathsSafe(dirpath) {
|
|
17
|
+
if (!(await fs_extra_1.default.pathExists(dirpath)))
|
|
18
|
+
return undefined;
|
|
19
|
+
return await (0, readDirectoryDirentsPaths_1.readDirectoryDirentsPaths)(dirpath);
|
|
20
|
+
}
|
|
21
|
+
exports.readDirectoryDirentsPathsSafe = readDirectoryDirentsPathsSafe;
|
|
22
|
+
//# sourceMappingURL=readDirectoryDirentsPathsSafe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryDirentsPathsSafe.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirentsPathsSafe.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,2EAAuE;AAEvE;;;;;;;;GAQG;AAEI,KAAK,UAAU,6BAA6B,CACjD,OAAe;IAEf,IAAI,CAAC,CAAC,MAAM,kBAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAAE,OAAO,SAAS,CAAA;IACrD,OAAO,MAAM,IAAA,qDAAyB,EAAC,OAAO,CAAC,CAAA;AACjD,CAAC;AALD,sEAKC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import fs from 'fs-extra';
|
|
3
|
+
/**
|
|
4
|
+
* Reads a fs.Dirent of all FSO's (files/directories/etc.) in a directory.
|
|
5
|
+
* Each FSO's full 'path' is available as a lazy-evaluated getter property on the returned Dirent object.
|
|
6
|
+
* If the directory does not exist, returns undefined.
|
|
7
|
+
*
|
|
8
|
+
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
9
|
+
*
|
|
10
|
+
* @param dirpath - The path of the directory to read.
|
|
11
|
+
*/
|
|
12
|
+
export declare function readDirectoryDirentsPathsSafeSync(dirpath: string): Array<fs.Dirent & {
|
|
13
|
+
get path(): string;
|
|
14
|
+
}> | undefined;
|
|
15
|
+
//# sourceMappingURL=readDirectoryDirentsPathsSafeSync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryDirentsPathsSafeSync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirentsPathsSafeSync.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AAGzB;;;;;;;;GAQG;AAEH,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,MAAM,GACd,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG;IAAE,IAAI,IAAI,IAAI,MAAM,CAAA;CAAE,CAAC,GAAG,SAAS,CAGvD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirectoryDirentsPathsSafeSync = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
+
const readDirectoryDirentsPathsSync_1 = require("./readDirectoryDirentsPathsSync");
|
|
7
|
+
/**
|
|
8
|
+
* Reads a fs.Dirent 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 Dirent object.
|
|
10
|
+
* If the directory does not exist, returns undefined.
|
|
11
|
+
*
|
|
12
|
+
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
13
|
+
*
|
|
14
|
+
* @param dirpath - The path of the directory to read.
|
|
15
|
+
*/
|
|
16
|
+
function readDirectoryDirentsPathsSafeSync(dirpath) {
|
|
17
|
+
if (!fs_extra_1.default.pathExistsSync(dirpath))
|
|
18
|
+
return undefined;
|
|
19
|
+
return (0, readDirectoryDirentsPathsSync_1.readDirectoryDirentsPathsSync)(dirpath);
|
|
20
|
+
}
|
|
21
|
+
exports.readDirectoryDirentsPathsSafeSync = readDirectoryDirentsPathsSafeSync;
|
|
22
|
+
//# sourceMappingURL=readDirectoryDirentsPathsSafeSync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryDirentsPathsSafeSync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirentsPathsSafeSync.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,mFAA+E;AAE/E;;;;;;;;GAQG;AAEH,SAAgB,iCAAiC,CAC/C,OAAe;IAEf,IAAI,CAAC,kBAAE,CAAC,cAAc,CAAC,OAAO,CAAC;QAAE,OAAO,SAAS,CAAA;IACjD,OAAO,IAAA,6DAA6B,EAAC,OAAO,CAAC,CAAA;AAC/C,CAAC;AALD,8EAKC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import fs from 'fs-extra';
|
|
3
|
+
/**
|
|
4
|
+
* Reads a fs.Dirent of all FSO's (files/directories/etc.) in a directory.
|
|
5
|
+
* Each FSO's full 'path' is available as a lazy-evaluated getter property on the returned Dirent object.
|
|
6
|
+
*
|
|
7
|
+
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
8
|
+
*
|
|
9
|
+
* @param dirpath - The path of the directory to read.
|
|
10
|
+
*/
|
|
11
|
+
export declare function readDirectoryDirentsPathsSync(dirpath: string): Array<fs.Dirent & {
|
|
12
|
+
get path(): string;
|
|
13
|
+
}>;
|
|
14
|
+
//# sourceMappingURL=readDirectoryDirentsPathsSync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryDirentsPathsSync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirentsPathsSync.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AAGzB;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG;IAAE,IAAI,IAAI,IAAI,MAAM,CAAA;CAAE,CAAC,CAUxG"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirectoryDirentsPathsSync = 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.Dirent 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 Dirent object.
|
|
10
|
+
*
|
|
11
|
+
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
12
|
+
*
|
|
13
|
+
* @param dirpath - The path of the directory to read.
|
|
14
|
+
*/
|
|
15
|
+
function readDirectoryDirentsPathsSync(dirpath) {
|
|
16
|
+
const dirents = fs_extra_1.default.readdirSync(dirpath, { withFileTypes: true });
|
|
17
|
+
return dirents.map((dirent) => {
|
|
18
|
+
return Object.defineProperty(dirent, 'path', {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get() {
|
|
21
|
+
return path_1.default.join(dirpath, this.name);
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
exports.readDirectoryDirentsPathsSync = readDirectoryDirentsPathsSync;
|
|
27
|
+
//# sourceMappingURL=readDirectoryDirentsPathsSync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryDirentsPathsSync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirentsPathsSync.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,wDAAuB;AAEvB;;;;;;;GAOG;AACH,SAAgB,6BAA6B,CAAC,OAAe;IAC3D,MAAM,OAAO,GAAG,kBAAE,CAAC,WAAW,CAAC,OAAO,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;IAChE,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QAC5B,OAAO,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE;YAC3C,UAAU,EAAE,IAAI;YAChB,GAAG;gBACD,OAAO,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;YACtC,CAAC;SACF,CAAuC,CAAA;IAC1C,CAAC,CAAC,CAAA;AACJ,CAAC;AAVD,sEAUC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import fs from 'fs-extra';
|
|
3
|
+
/**
|
|
4
|
+
* Reads a fs.Dirent of all FSO's (files/directories/etc.) in a directory.
|
|
5
|
+
* If the directory does not exist, returns undefined.
|
|
6
|
+
*
|
|
7
|
+
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
8
|
+
*
|
|
9
|
+
* @param dirpath - The path of the directory to read.
|
|
10
|
+
*/
|
|
11
|
+
export declare function readDirectoryDirentsSafe(dirpath: string): Promise<fs.Dirent[] | undefined>;
|
|
12
|
+
//# sourceMappingURL=readDirectoryDirentsSafe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryDirentsSafe.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirentsSafe.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AAEzB;;;;;;;GAOG;AAEH,wBAAsB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,CAGhG"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirectoryDirentsSafe = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
+
/**
|
|
7
|
+
* Reads a fs.Dirent of all FSO's (files/directories/etc.) in a directory.
|
|
8
|
+
* If the directory does not exist, returns undefined.
|
|
9
|
+
*
|
|
10
|
+
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
11
|
+
*
|
|
12
|
+
* @param dirpath - The path of the directory to read.
|
|
13
|
+
*/
|
|
14
|
+
async function readDirectoryDirentsSafe(dirpath) {
|
|
15
|
+
if (!(await fs_extra_1.default.pathExists(dirpath)))
|
|
16
|
+
return undefined;
|
|
17
|
+
return await fs_extra_1.default.readdir(dirpath, { withFileTypes: true });
|
|
18
|
+
}
|
|
19
|
+
exports.readDirectoryDirentsSafe = readDirectoryDirentsSafe;
|
|
20
|
+
//# sourceMappingURL=readDirectoryDirentsSafe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryDirentsSafe.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirentsSafe.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AAEzB;;;;;;;GAOG;AAEI,KAAK,UAAU,wBAAwB,CAAC,OAAe;IAC5D,IAAI,CAAC,CAAC,MAAM,kBAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAAE,OAAO,SAAS,CAAA;IACrD,OAAO,MAAM,kBAAE,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;AAC3D,CAAC;AAHD,4DAGC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import fs from 'fs-extra';
|
|
3
|
+
/**
|
|
4
|
+
* Reads a fs.Dirent of all FSO's (files/directories/etc.) in a directory.
|
|
5
|
+
* If the directory does not exist, returns undefined.
|
|
6
|
+
*
|
|
7
|
+
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
8
|
+
*
|
|
9
|
+
* @param dirpath - The path of the directory to read.
|
|
10
|
+
*/
|
|
11
|
+
export declare function readDirectoryDirentsSafeSync(dirpath: string): fs.Dirent[] | undefined;
|
|
12
|
+
//# sourceMappingURL=readDirectoryDirentsSafeSync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryDirentsSafeSync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirentsSafeSync.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AAEzB;;;;;;;GAOG;AAEH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,GAAG,EAAE,CAAC,MAAM,EAAE,GAAG,SAAS,CAGrF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirectoryDirentsSafeSync = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
+
/**
|
|
7
|
+
* Reads a fs.Dirent of all FSO's (files/directories/etc.) in a directory.
|
|
8
|
+
* If the directory does not exist, returns undefined.
|
|
9
|
+
*
|
|
10
|
+
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
11
|
+
*
|
|
12
|
+
* @param dirpath - The path of the directory to read.
|
|
13
|
+
*/
|
|
14
|
+
function readDirectoryDirentsSafeSync(dirpath) {
|
|
15
|
+
if (!fs_extra_1.default.pathExistsSync(dirpath))
|
|
16
|
+
return undefined;
|
|
17
|
+
return fs_extra_1.default.readdirSync(dirpath, { withFileTypes: true });
|
|
18
|
+
}
|
|
19
|
+
exports.readDirectoryDirentsSafeSync = readDirectoryDirentsSafeSync;
|
|
20
|
+
//# sourceMappingURL=readDirectoryDirentsSafeSync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryDirentsSafeSync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirentsSafeSync.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AAEzB;;;;;;;GAOG;AAEH,SAAgB,4BAA4B,CAAC,OAAe;IAC1D,IAAI,CAAC,kBAAE,CAAC,cAAc,CAAC,OAAO,CAAC;QAAE,OAAO,SAAS,CAAA;IACjD,OAAO,kBAAE,CAAC,WAAW,CAAC,OAAO,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;AACzD,CAAC;AAHD,oEAGC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import fs from 'fs-extra';
|
|
3
|
+
/**
|
|
4
|
+
* Reads a fs.Dirent of all FSO's (files/directories/etc.) in a directory.
|
|
5
|
+
*
|
|
6
|
+
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
7
|
+
*
|
|
8
|
+
* @param dirpath - The path of the directory to read.
|
|
9
|
+
*/
|
|
10
|
+
export declare function readDirectoryDirentsSync(dirpath: string): fs.Dirent[];
|
|
11
|
+
//# sourceMappingURL=readDirectoryDirentsSync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryDirentsSync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirentsSync.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AAEzB;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,EAAE,CAAC,MAAM,EAAE,CAErE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirectoryDirentsSync = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
6
|
+
/**
|
|
7
|
+
* Reads a fs.Dirent of all FSO's (files/directories/etc.) in a directory.
|
|
8
|
+
*
|
|
9
|
+
* @remarks The fs.Dirent object contains the name of the FSO, and its type (isDirectory, isFile, etc.)
|
|
10
|
+
*
|
|
11
|
+
* @param dirpath - The path of the directory to read.
|
|
12
|
+
*/
|
|
13
|
+
function readDirectoryDirentsSync(dirpath) {
|
|
14
|
+
return fs_extra_1.default.readdirSync(dirpath, { withFileTypes: true });
|
|
15
|
+
}
|
|
16
|
+
exports.readDirectoryDirentsSync = readDirectoryDirentsSync;
|
|
17
|
+
//# sourceMappingURL=readDirectoryDirentsSync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryDirentsSync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryDirentsSync.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AAEzB;;;;;;GAMG;AACH,SAAgB,wBAAwB,CAAC,OAAe;IACtD,OAAO,kBAAE,CAAC,WAAW,CAAC,OAAO,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;AACzD,CAAC;AAFD,4DAEC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads the basenames of all FSO's (files/directories/etc.) in a directory.
|
|
3
|
+
* If the directory
|
|
4
|
+
* @param dirpath - The path of the directory to read.
|
|
5
|
+
*/
|
|
6
|
+
export declare function readDirectoryNames(dirpath: string): Promise<string[]>;
|
|
7
|
+
//# sourceMappingURL=readDirectoryNames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryNames.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryNames.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAE3E"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readDirectoryNames = 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
|
|
9
|
+
* @param dirpath - The path of the directory to read.
|
|
10
|
+
*/
|
|
11
|
+
async function readDirectoryNames(dirpath) {
|
|
12
|
+
return await fs_extra_1.default.readdir(dirpath);
|
|
13
|
+
}
|
|
14
|
+
exports.readDirectoryNames = readDirectoryNames;
|
|
15
|
+
//# sourceMappingURL=readDirectoryNames.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryNames.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryNames.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AAEzB;;;;GAIG;AACI,KAAK,UAAU,kBAAkB,CAAC,OAAe;IACtD,OAAO,MAAM,kBAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;AAClC,CAAC;AAFD,gDAEC"}
|
|
@@ -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 readDirectoryNamesPaths(dirpath: string): Promise<Array<{
|
|
8
|
+
name: string;
|
|
9
|
+
get path(): string;
|
|
10
|
+
}>>;
|
|
11
|
+
//# sourceMappingURL=readDirectoryNamesPaths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDirectoryNamesPaths.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/readDirectoryNamesPaths.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,IAAI,IAAI,MAAM,CAAA;CAAE,CAAC,CAAC,CASnH"}
|