Gathering detailed insights and metrics for fs-assistant
Gathering detailed insights and metrics for fs-assistant
Gathering detailed insights and metrics for fs-assistant
Gathering detailed insights and metrics for fs-assistant
npm install fs-assistant
Typescript
Module System
Node Version
NPM Version
TypeScript (98.43%)
JavaScript (1.57%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
3 Stars
38 Commits
2 Forks
1 Watchers
7 Branches
1 Contributors
Updated on Feb 25, 2024
Latest Version
0.2.7
Package Id
fs-assistant@0.2.7
Unpacked Size
32.81 kB
Size
8.39 kB
File Count
6
NPM Version
10.2.3
Node Version
18.19.0
Published on
Feb 25, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
fs-assistant is a simple library that gives you recursive folder copying, simplified file overrides and promisified fs functions.
1replaceStringInFile (pathToFile: string, stringPattern: RegExp | string, newString: string) => Promise<void>
Replaces a string in a file that matches the pattern with the new given string.
1copyDir (pathToDir: string, pathToNewDir: string) => Promise<void>
Recursively copies all files from a directory to another.
1readFile (fileLocation: string) => Promise<string>
Promisified version of fs readFile.
1writeFile (newFileLocation: string, contents:any) => Promise<void>
Promisified version of fs writeFile.
1copyFile (from: string, to: string) => Promise<void>
Promisified version of fs copyFile.
1makeDir (location: string) => Promise<void>
Promisified version of fs makeDir.
1deleteFile (location: string) => Promise<void>
Deletes the specified file.
1renameFile (fileLocation: string, newFileName: string) => Promise<void>
Renames the specified file
1isPath (stringToCheck: string) => boolean
Checks if the given string is a valid path. You can check all covered cases here.
1flattenDir (dirLocation: string, newLocation: string) => Promise<void>
Moves all files from a directory (recursively) to a new directory.
For example if you have the directory ./myFiles
with a file ./myFiles/myFile.txt
and a nested directory ./myFiles/nestedFiles
which contains ./myFiles/nestedFiles/nestedFile.txt
the flattenDir function will move both files to the same level in a new output directory.
1getFilesInDir(dirLocation: string) => Promise<FileDetails[]>
Returns an array with all file names and locations in a directory (recursively). Note that the location property in FileDetails represents the path + the name of the file.
1readDir(dir: string) => Promise<string[]>
The promisified version of fs.readdir.
1getDirsInDir(dirLocation: string) => Promise<FileDetails[]>
Returns an array with all sub directories of a directory.
1getFilesInDir(dirLocation: string) => Promise<DirectoryDetails[]>
Returns an array with all items represented either as FileDetails or as DirectoryDetails.
1getFileSizeInBytes: (location: string) => Promise<number>;
Returns the file size in bytes.
1getDirSizeInBytes: (location: string) => Promise<number>;
Returns the directory size in bytes.
1delDir: (location: string) => Promise<void>;
Deletes the directory recursively.
1existsSync: (location: string) => boolean;
Equivalent to fs.existsSync()
.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
4 existing vulnerabilities detected
Details
Reason
Found 0/28 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More