
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
@ecopages/file-system
Advanced tools
Runtime-agnostic file system utilities for Ecopages with Bun and Node adapters
Runtime-agnostic file system utilities for Ecopages with optimized Bun and Node.js adapters.
Bun.Glob, Bun.hash, Bun.file for maximum performancefast-glob and crypto for full compatibilitybun add @ecopages/file-system
import { fileSystem } from '@ecopages/file-system';
// Glob files
const files = await fileSystem.glob(['**/*.ts'], { cwd: './src' });
// Read files
const content = await fileSystem.readFile('file.txt');
// Hash files
const hash = fileSystem.hash('file.txt');
// Write files
fileSystem.write('output.txt', 'Hello World');
// Check existence
if (fileSystem.exists('file.txt')) {
// ...
}
| Method | Description |
|---|---|
glob(patterns, options) | Find files matching glob patterns |
readFile(path) | Read file as string (async) |
readFileSync(path) | Read file as string (sync) |
readFileAsBuffer(path) | Read file as Buffer |
write(path, content) | Write content to file |
writeAsync(path, content) | Write content to file (async) |
exists(path) | Check if path exists |
ensureDir(path) | Ensure directory exists |
copyDir(src, dest) | Copy directory recursively |
copyFile(src, dest) | Copy single file |
remove(path) | Remove file or directory |
removeAsync(path) | Remove file or directory (async) |
hash(path) | Get hash of file contents |
gzipFile(path) | Gzip a single file |
gzipDir(path, extensions) | Gzip files in directory |
isDirectory(path) | Check if path is directory |
verifyFileExists(path) | Throw if file doesn't exist |
Benchmark results (Apple M4):
| Operation | BunFileSystem | NodeFileSystem |
|---|---|---|
| glob (100 files) | 64.85 µs | 71.06 µs |
| hash (1MB file) | 87 µs | 393 µs |
Bun adapter is 4.5x faster for file hashing.
MIT
FAQs
Runtime-agnostic file system utilities for Ecopages with Bun and Node adapters
We found that @ecopages/file-system demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.