# hachiware_fs

> Extended wrapper for file operation package "fs".

Latest version **1.0.3** (published 2022-02-14) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2022-02-14 |
| First published | 2021-12-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Nakatsuji Masato |
| Maintainers | nakatsuji_npm19 |
| Keywords | javascript, file, directory |

## Links

- npm: https://www.npmjs.com/package/hachiware_fs
- Repository: https://github.com/masatonakatsuji2021/hachiware_fs
- Homepage: https://hachiware-js.com/
- Issues: https://github.com/masatonakatsuji2021/hachiware_fs/issues
- npm.io page: https://npm.io/package/hachiware_fs

## 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

- 1.0.3 (latest) — 2022-02-14
- 1.0.2 — 2022-01-07
- 1.0.1 — 2022-01-04
- 1.0.0 — 2021-12-18

## README

# Hachiware_fs

<a href="https://github.com/masatonakatsuji2021/hachiware_fs/blob/master/LICENSE"><img alt="GitHub license" src="https://img.shields.io/github/license/masatonakatsuji2021/hachiware_fs"></a>
<img alt="GitHub package.json version" src="https://img.shields.io/github/package-json/v/masatonakatsuji2021/hachiware_fs">
<img alt="GitHub top language" src="https://img.shields.io/github/languages/top/masatonakatsuji2021/hachiware_fs">
<img src="https://img.shields.io/badge/author-Nakatsuji%20Masato-brightgreen" alt="author Nakatsuji Masato">
<img src="https://img.shields.io/badge/made%20in-Japan-brightgreen" alt="made in japan">

An extended wrapper package for the file operation package "fs".  
A package for getting file / directory information and copying / deleting in a deep hierarchy.

---

## # Sample Source

Place the sample source in the test directory in the package.

```
L sample1.js
L sample2.js
L sample3.js
```

- sample1.js .... Get file / directory information list
- sample2.js .... Bulk copy of files / directories.
- sample3.js .... Bulk delete files / directories

---

## # How do you use this?

First, install the npm package with the following command.

```
npm i hachiware_fs
```
All you have to do is add the package require code to index.js etc. and you're ready to go.  

```javascript
const fs = require("hachiware_fs");
```

---

## # Get a list of files/directories up to the deep hierarchy

You can get a list of files / directories up to a deep hierarchy by using the `` deepReadDir`` method.

```javascript
const fs = require("hachiware_fs");

console.log(fs.ddepReadDir("sample_directory"));
```

Specify the directory path (relative is also possible) in the argument.  
It is assumed that the specified directory path exists.

The return value will be the following object.

```
{
   file:
   [ 'testdirectory/dir_1/dir_1a/test.txt',
     'testdirectory/dir_1/dir_1b/test.txt',
     'testdirectory/dir_1/test.txt',
     'testdirectory/test.txt' ],
  dir:
   [ 'testdirectory/dir_1',
     'testdirectory/dir_1/dir_1a',
     'testdirectory/dir_1/dir_1b',
     'testdirectory/dir_2',
     'testdirectory/dir_2/dir_2a',
     'testdirectory/dir_2/dir_2b' ] 
}
```

---

## # Bulk copy of files/directories

By using the `` deepCopy`` method, you can easily make a batch copy for each directory.

```javascript
const fs = require("hachiware_fs");

fs.ddepReadDir("sample_directory","__copy_sample_directory");
```

Specify the copy source path and copy destination path as arguments, respectively.

This alone copies the files and directories in the source path to the destination path all at once.

---

## # Bulk delete files/directories

By using the `` deepDelete`` method, you can easily delete all directories at once.

```javascript
const fs = require("hachiware_fs");

fs.deepDelete("sample_directory");
```

Specify the path to be deleted in the argument.

You can delete the specified path with just this.

---

Hachiware_fs

An extended wrapper package for the file operation package "fs".  
 
License : MIT License.   
Author  : Nakatsuji Masato  
HP URL  : [https://hachiware-js.com/](https://hachiware-js.com/)  
GitHub  : [https://github.com/masatonakatsuji2021/Hachiware_fs](https://github.com/masatonakatsuji2021/Hachiware_fs)  
npm     : [https://www.npmjs.com/package/Hachiware_fs](https://www.npmjs.com/package/Hachiware_fs)

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