# easyfile

> Easy file manipulation.

Latest version **0.2.0** (published 2018-03-13) · ISC license · 0 weekly downloads

## Install

```sh
npm install easyfile
pnpm add easyfile
yarn add easyfile
bun add easyfile
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2018-03-13 |
| First published | 2015-02-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Yuanyan Cao |
| Maintainers | yuanyan |
| Keywords | fs, file |

## Links

- npm: https://www.npmjs.com/package/easyfile
- Repository: https://github.com/yuanyan/easyfile
- Issues: https://github.com/yuanyan/easyfile/issues
- npm.io page: https://npm.io/package/easyfile

## Dependencies (1)

- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 0.2.0 (latest) — 2018-03-13
- 0.1.1 — 2016-09-05
- 0.1.0 — 2015-02-05

## README

# easyfile
> Super tiny and useful file uitls.

## Install

```sh
npm install easyfile --save
```

## What easyfile do?

1. Map some sync method as default name:

```js
easyfile.exists = fs.existsSync;
easyfile.chmod = fs.chmodSync;
easyfile.chown = fs.chownSync;
easyfile.append = fs.appendeasyfileSync;
easyfile.stat = fs.statSync;
easyfile.read = fs.readeasyfileSync;
easyfile.readlink = fs.readlinkSync;
easyfile.readdir = fs.readdirSync;
easyfile.rename = fs.renameSync;
easyfile.rmdir = fs.rmdirSync;
easyfile.unlink = fs.unlinkSync;
```

2. `mkdir` is `mddirp`

```js
easyfile.mkdir('/newpath/newpath/newpath');
```

3. `copy` support file and dir

```js
easyfile.copy('fromfile', 'tofile');
easyfile.copy('fromdir', 'todir');
```

When copy dir, some file or sub directory not you want could be filter:

```js
easyfile.copy('fromdir', 'todir', {
  // only copy js file
  filter: filepath => path.extname(filepath) === '.js'
})
```


4. `write` could force write and backup

```js
easyfile.write('tofile', data, {
  force: true,
  backup: true
});
```

---
_Source: https://npm.io/package/easyfile · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
