fs-posix
v6.0.0
Published
Add cross-platform path support for Node file system
Downloads
80,052
Maintainers
Readme
fs-posix
Add cross-platform path support for Node file system.
Why
- Add POSIX style path support for Windows.
- POSIX style root path will be convert to Git install directory.
- Support for the Cygwin mount table.
- Support for The cygdrive path prefix.
- Add Windows style path support for WSL.
- Add tilde path prefix support.
Install
npm install --save fs-posix
Usage
require("fs-posix"); // Must load before `fs-extra`
const fs = require("fs");
fs.readFileSync("~/.npmrc"); // Returns the contents of `.npmrc` in home folder
fs.readFileSync("/etc/hosts"); // Returns the contents of `hosts` in etc folder
fs.readFileSync("/tmp/test.log") // Returns the contents of `test.log` in temp folder