@hugoalh/fs
An ECMAScript (JavaScript & TypeScript) module for enhanced file system operation.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (7.8%) to scientific vocabulary
Keywords
Repository
An ECMAScript (JavaScript & TypeScript) module for enhanced file system operation.
Basic Info
Statistics
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 5
- Releases: 5
Topics
Metadata Files
README.md
File System (ES)
An ECMAScript (JavaScript & TypeScript) module for enhanced file system operation.
🔰 Begin
🎯 Targets
| Targets | Remote | JSR | NPM | |:--|:-:|:-:|:-:| | Bun >= v1.1.0 | ❌ | ❓ | ✔️ | | Deno >= v2.1.0 | ✔️ | ✔️ | ✔️ | | NodeJS >= v20.9.0 | ❌ | ❓ | ✔️ |
[!NOTE] - It is possible to use this module in other methods/ways which not listed in here, however those methods/ways are not officially supported, and should beware maybe cause security issues.
#️⃣ Resources Identifier
- Remote - GitHub Raw:
https://raw.githubusercontent.com/hugoalh/fs-es/{Tag}/mod.ts - JSR:
[jsr:]@hugoalh/fs[@{Tag}] - NPM:
[npm:]@hugoalh/fs[@{Tag}]
[!NOTE] - For usage of remote resources, it is recommended to import the entire module with the main path
mod.ts, however it is also able to import part of the module with sub path if available, but do not import if:
- it's path has an underscore prefix (e.g.:
_foo.ts,_util/bar.ts), or- it is a benchmark or test file (e.g.:
foo.bench.ts,foo.test.ts), or- it's symbol has an underscore prefix (e.g.:
_bar,_foo).These elements are not considered part of the public API, thus no stability is guaranteed for them. - For usage of JSR or NPM resources, it is recommended to import the entire module with the main entrypoint, however it is also able to import part of the module with sub entrypoint if available, please visit the file
jsr.jsoncpropertyexportsfor available sub entrypoints. - It is recommended to use this module with tag for immutability.
🛡️ Runtime Permissions
- File System - Read (Deno:
read; NodeJS:fs-read):- Resources
- File System - Write (Deno:
write; NodeJS:fs-write):- Resources (Optional)
- Subprocesses (Deno:
run):pwsh(Optional)
- System Information (Deno:
sys):gid(Optional, POSIX/UNIX Platforms)uid(Optional, POSIX/UNIX Platforms)
🧩 APIs
ts function compareDirectories(oldPath: string | URL, newPath: string | URL): Promise<FSCompareDirectoriesResult>;ts function emptyDir(path: string | URL): Promise<void>;ts function ensureDir(path: string | URL): Promise<void>;ts function ensureFile(path: string | URL): Promise<void>;ts function ensureLink(sourcePath: string | URL, targetPath: string | URL): Promise<void>;ts function ensureSymlink(sourcePath: string | URL, targetPath: string | URL): Promise<void>;ts function exist(path: string | URL, options?: FSExistOptions): Promise<boolean>;ts function getDriveInfo(options?: FSGetDriveInfoOptions): Promise<FSDriveInfo[]>;ts function getHash(path: string | URL, options?: FSGetHashOptions): Promise<string>;ts function getSize(path: string | URL): Promise<bigint>;ts function walk(root: string | URL, options?: FSWalkOptions & { extraInfo?: false; }): Promise<AsyncGenerator<FSWalkEntry>>; function walk(root: string | URL, options: FSWalkOptions & { extraInfo: true; }): Promise<AsyncGenerator<FSWalkEntryExtra>>;
[!NOTE] - For the full or prettier documentation, can visit via: - Deno CLI
deno doc- JSR
✍️ Examples
ts await emptyDir("./foo");ts await ensureDir("./foo");ts await ensureFile("./foo.dat");ts await ensureLink("./path/to/source.dat", "./path/to/link.dat");ts await ensureSymlink("./path/to/source.dat", "./path/to/link.dat");ts await exist("./exist"); //=> truets await getHash(Deno.cwd()); //=> "87C77A27D4779AB3078B941B86FF07CA0929A4E9D9581F6BAE380F3194287E3ADF4863355711426E79D4B673B71E9DE5F2A3E3F9D12C93FF2BDBD376DE93065D"
Owner
- Name: hugoalh
- Login: hugoalh
- Kind: user
- Location: Everywhere
- Company: @hugoalh-studio
- Twitter: hugoalhofficial
- Repositories: 12
- Profile: https://github.com/hugoalh
Lead of @hugoalh-studio; Full time software developer; Part time freelancer
Citation (CITATION.cff)
# yaml-language-server: $schema=https://citation-file-format.github.io/1.2.0/schema.json cff-version: "1.2.0" title: "File System (ES)" message: "If you use this software, please cite it using the metadata from this file." type: "software" authors: - name: "hugoalh" repository-code: "https://github.com/hugoalh/fs-es" keywords: - "ecmascript" - "ecmascript-module" - "es" - "es-module" - "esm" - "esmodule" - "file" - "file-system" - "fs" - "javascript" - "js" - "ts" - "typescript" license: "MIT"
GitHub Events
Total
- Create event: 12
- Release event: 5
- Issues event: 5
- Watch event: 1
- Delete event: 6
- Issue comment event: 1
- Push event: 71
- Pull request event: 7
Last Year
- Create event: 12
- Release event: 5
- Issues event: 5
- Watch event: 1
- Delete event: 6
- Issue comment event: 1
- Push event: 71
- Pull request event: 7
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 4
- Total pull requests: 6
- Average time to close issues: 4 days
- Average time to close pull requests: 1 day
- Total issue authors: 1
- Total pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 5
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 4
- Pull requests: 6
- Average time to close issues: 4 days
- Average time to close pull requests: 1 day
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 5
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- hugoalh (4)
Pull Request Authors
- hugoalh (8)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- npm 7 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 5
- Total maintainers: 1
npmjs.org: @hugoalh/fs
A module for enhanced file system operation.
- Homepage: https://github.com/hugoalh/fs-es#readme
- License: MIT
-
Latest release: 0.4.0
published 12 months ago