6.11.0-next.1596523086.92288f125c8c20edf7371dc9433371e4507c7541 • Published 5 years ago

safefs v6.11.0-next.1596523086.92288f125c8c20edf7371dc9433371e4507c7541

Weekly downloads
295,374
License
MIT
Repository
github
Last release
5 years ago

Stop getting EMFILE errors! Open only as many files as the operating system supports.

Usage

var safefs = require('safefs')

SafeFS uses graceful-fs to wrap all of the standard file system methods to avoid EMFILE errors among other problems.

On-top of graceful-fs, SafeFS also adds additional wrapping on the following methods:

  • writeFile(path, data, options?, next) - ensure the full path exists before writing to it
  • appendFile(path, data, options?, next) - ensure the full path exists before writing to it
  • mkdir(path, mode?, next) - mode defaults to 0o777 & (~process.umask())
  • unlink(path, next) - checks if the file exists before removing it

SafeFS also define these additional methods:

  • ensurePath(path, options, next) - ensure the full path exists, equivalent to unix's mdir -p path
  • getParentPathSync(path) - returns the parent directory of the path

npm

Discover the release history by heading on over to the HISTORY.md file.

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

These amazing people are maintaining this project:

No sponsors yet! Will you be the first?

These amazing people have contributed code to this project:

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

Unless stated otherwise all works are:

and licensed under:

8.10.0

2 years ago

8.8.0

2 years ago

8.9.0

2 years ago

8.7.0

2 years ago

8.6.0

2 years ago

8.1.0

2 years ago

8.2.0

2 years ago

8.4.0

2 years ago

8.3.0

2 years ago

8.5.0

2 years ago

8.0.0

2 years ago

6.16.0

4 years ago

6.15.0

4 years ago

6.14.0

5 years ago

6.13.0

5 years ago

6.12.0

5 years ago

6.11.0

5 years ago

6.10.0

5 years ago

6.9.0

5 years ago

6.8.0

5 years ago

6.7.0

6 years ago

6.6.0

6 years ago

6.5.0

6 years ago

6.4.0

6 years ago

6.3.0

6 years ago

6.2.0

6 years ago

6.1.0

6 years ago

6.0.0

6 years ago

5.5.0

6 years ago

5.4.0

6 years ago

5.3.0

6 years ago

5.2.0

6 years ago

5.1.0

6 years ago

5.0.0

6 years ago

4.2.0

6 years ago

4.1.0

10 years ago

4.0.1

10 years ago

4.0.0

10 years ago

3.2.2

10 years ago

3.2.1

10 years ago

3.2.0

10 years ago

3.1.3

11 years ago

3.1.2

11 years ago

3.1.1

12 years ago

3.1.0

12 years ago

3.0.6

12 years ago

3.0.5

12 years ago

3.0.4

12 years ago

3.0.3

12 years ago

3.0.2

12 years ago

3.0.1

13 years ago

3.0.0

13 years ago

2.0.3

13 years ago

2.0.2

13 years ago

2.0.1

13 years ago

2.0.0

13 years ago