# md5storage

> 计算文件的md5值，并存入指定目录， 并用md5当文件名，可以避免重复文件

Latest version **1.0.3** (published 2019-07-04) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2019-07-04 |
| First published | 2019-03-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 11.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | w2moon |

## Links

- npm: https://www.npmjs.com/package/md5storage
- Repository: https://github.com/w2moon/md5storage
- Homepage: https://github.com/w2moon/md5storage#readme
- Issues: https://github.com/w2moon/md5storage/issues
- npm.io page: https://npm.io/package/md5storage

## Dependencies (1)

- [wlutil](https://npm.io/package/wlutil.md) ^1.0.3

## Recent versions

- 1.0.3 (latest) — 2019-07-04
- 1.0.2 — 2019-03-15
- 1.0.1 — 2019-03-15
- 1.0.0 — 2019-03-14

## README

# md5storage

计算文件的md5值，并存入指定目录，
并用md5当文件名，可以避免重复文件

一般用法

let store = new MD5Storage("tempFolderPath");

let myfile = "pathToFile";
let newfile = "对应myfile的转换后新文件";

let md5file = store.getValidPath(myfile);
if(md5file){
    //文件已经存在

    // 读取文件内容
    fs.readSync(md5file);
}
else{
    //文件不存在

    //保存新文件
    store.save(myfile,newfile);
}

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