Installations
npm install extra-filesystem
Releases
Unable to fetch releases
Developer
Developer Guide
Module System
ESM
Min. Node Version
>=16
Typescript Support
Yes
Node Version
18.16.0
NPM Version
9.5.1
Statistics
160 Commits
3 Watching
1 Branches
1 Contributors
Updated on 21 Sept 2024
Languages
TypeScript (98.26%)
JavaScript (1.74%)
Total Downloads
Cumulative downloads
Total Downloads
31,149
Last day
1,100%
12
Compared to previous day
Last week
27.5%
1,221
Compared to previous week
Last month
1,049.1%
2,597
Compared to previous month
Last year
12%
5,693
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
23
extra-filesystem
Install
1npm install --save extra-filesystem 2# or 3yarn add extra-filesystem
API
createTempDir
1function createTempDir(): Promise<string>
createTempDirSync
1function createTempDirSync(): string
createTempFile
1function createTempFile(): Promise<string>
createTempFileSync
1function createTempFileSync(): string
createTempName
1function createTempName(): Promise<stirng>
createTempNameSync
1function createTempNameSync(): string
emptyDir
1function emptyDir(dirname: string): Promise<void>
emptyDirSync
1function emptyDirSync(dirname: string): void
ensureDir
1function ensureDir(dirname: string): Promise<void>
ensureDirSync
1function ensureDirSync(dirname: string): void
ensureFile
1function ensureFile(filename: string): Promise<void>
ensureFileSync
1function ensureFileSync(filename: string): void
pathExists
1function pathExists(path: string): Promise<boolean>
pathExistsSync
1function pathExistsSync(path: string): boolean
readNDJSONFile
1function readNDJSONFile<T>( 2 filename: string 3, encoding: BufferEncoding = 'utf-8' 4): AsyncIterableIterator<T>
readNDJSONFileSync
1function readNDJSONFileSync<T>( 2 filename: string 3, encoding: BufferEncoding = 'utf-8' 4): IterableIterator<T>
readYAMLFile
1function readYAMLFile<T>( 2 filename: string 3, encoding: BufferEncoding = 'utf-8' 4): Promise<T>
readYAMLFileSync
1function readYAMLFileSync<T>( 2 filename: string 3, encoding: BufferEncoding = 'utf-8' 4): T
readJSONFile
1function readJSONFile<T>( 2 filename: string 3, encoding: BufferEncoding = 'utf-8' 4): Promise<T>
readJSONFileSync
1function readJSONFileSync<T>( 2 filename: string 3, encoding: BufferEncoding = 'utf-8' 4): T
writeJSONFile
1function writeJSONFile(
2 filename: string
3, data: unknown
4, options?: { spaces?: number }
5): Promise<void>
writeJSONFileSync
1function writeJSONFileSync(
2 filename: string
3, data: unknown
4, options?: { spaces?: number }
5): void
writeYAMLFile
1function writeYAMLFile(filename: string, data: unknown): Promise<void>
writeYAMLFileSync
1function writeYAMLFileSync(filename: string, data: unknown): void
move
1function move(oldPath: string, newPath: string): Promise<void>
moveSync
1function moveSync(oldPath: string, newPath: string): void
copy
1function copy(sourcePath: string, destinationPath: string): Promise<void>
copySync
1function copySync(sourcePath: string, destinationPath: string): void
remove
1function remove(path: string): Promise<void>
removeSync
1function removeSync(path: string): void
isDirectory
1function isDirectory(path: string): Promise<boolean>
isFile
1function isFile(path: string): Promise<boolean>
isWritable
1function isWritable(path: string): Promise<boolean>
isReadable
1function isReadable(path: string): Promise<boolean>
findAllFilenames
1function findAllFilenames(
2 dirname: string
3, predicate: (dirname: string) => boolean = _ => true
4): AsyncIterableIterator<string>
findAllDirnames
1function findAllDirnames(
2 dirname: string
3, predicate: (dirname: string) => boolean = _ => true
4): AsyncIterableIterator<string>
getLongExtension
1function getLongExtension(filename: string): string
Get the longest possible extension.
1getLongExtension('file.tar.gz') // '.tar.gz'
getShortBasename
1function getShortBasename(filename: string): string
Get the shortest possible basename.
1getShortBasename('file.tar.gz') // 'file'
readFileLineByLine
1function readFileLineByLine(
2 filename: string
3, encoding: BufferEncoding = 'utf-8'
4): AsyncIterable<string>
readFileLineByLineSync
1function* readFileLineByLineSync(
2 filename: string
3, encoding: BufferEncoding = 'utf-8'
4): IterableIterator<string>
writeIterableToFile
1function writeIterableToFile( 2 filename: string 3, iterable: Iterable<string> | AsyncIterable<string> 4): Promise<void>
isSubPathOf
1function isSubPathOf(subject: string, object: string): boolean
checksumFile
1function checksumFile(algorithm: string, filename: string): Promise<string>
findUpPackageFilename
1function findUpPackageFilename(pathname: string): Promise<string | undefined>
findUpPackageFilenameSync
1function findUpPackageFilenameSync(pathname: string): string | undefined
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/nodejs.yml:1
- Info: no jobLevel write permissions found
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/BlackGlory/extra-filesystem/nodejs.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/BlackGlory/extra-filesystem/nodejs.yml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/nodejs.yml:21
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
15 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-4x5v-gmq8-25ch
- Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7
- Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6
- Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj
- Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v
- Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
Score
2.5
/10
Last Scanned on 2024-11-25
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