https://github.com/rodrigogs/fs
Fluid and promisified file system helpers
https://github.com/rodrigogs/fs
Last synced: about 1 month ago
JSON representation
Fluid and promisified file system helpers
- Host: GitHub
- URL: https://github.com/rodrigogs/fs
- Owner: rodrigogs
- License: bsd-3-clause
- Created: 2018-11-20T02:04:06.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T03:41:14.000Z (over 3 years ago)
- Last Synced: 2025-12-27T01:39:54.375Z (6 months ago)
- Language: JavaScript
- Homepage:
- Size: 370 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @rodrigogs/fs
My personal fs wrapper with some advanced features.
[](https://travis-ci.com/rodrigogs/fs)
## Install
```bash
$ npm install @rodrigogs/fs --save
```
## Usage
```javascript
const fs = require('.');
const fileContent = await fs.readFile('/path/to/file');
const fileExists = await fs.fileExists('/path/to/file');
const fileInfo = await fs.getFileInfo('/relative/to/filename');
const fileFound = await fs.findFile('fileName.foo');
const filteredFile = await fs.filterFiles('filename.foo');
const dirFiles = await fs.listDirFiles('/relative/path/to/dir');
await fs.createFile('/relative/to/filename', 'File content');
await fs.deleteFile('/relative/to/filename');
await fs.deleteDir('/relative/to/dir');
```