Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@absolunet/fss

Package Overview
Dependencies
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@absolunet/fss - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

16

index.js

@@ -6,4 +6,4 @@ //--------------------------------------------------------

const fs = require('fs');
const fsx = require('fs-extra');
const fs = require('fs');
const fsExtra = require('fs-extra');

@@ -19,10 +19,10 @@

copy: fsx.copySync,
ensureDir: fsx.ensureDirSync,
remove: fsx.removeSync,
copy: fsExtra.copySync,
ensureDir: fsExtra.ensureDirSync,
remove: fsExtra.removeSync,
move: (source, dest, options) => {
fsx.copySync(source, dest, options);
fsx.removeSync(source);
move: (src, dest, options) => {
fsExtra.copySync(src, dest, options);
fsExtra.removeSync(src);
}
};
{
"name": "@absolunet/fss",
"version": "0.3.0",
"version": "0.3.1",
"description": "fs / fs-extra sync wrapper",

@@ -20,13 +20,13 @@ "definition": "",

"engines": {
"node": ">= 8.0.0"
"node": ">= 8.5.0"
},
"scripts": {
"test": "mocha"
"test": "ava test"
},
"devDependencies": {
"@absolunet/tester": "0.0.5"
"@absolunet/tester": "1.1.0"
},
"dependencies": {
"fs-extra": "^3.0.1"
"fs-extra": "^4.0.2"
}
}

@@ -10,3 +10,79 @@ # @absolunet/fss

## License
See the [license](https://github.com/absolunet/node-fss/blob/master/license).
## Install
```sh
$ npm install @absolunet/fss
```
## Usage
```js
const fss = require('@absolunet/fss');
fss.move('/path1/path2/path3', '/path4');
```
## API
### copy(src, dest, [options])
Maps [`fsExtra.copySync`](https://github.com/jprichardson/node-fs-extra/blob/master/docs/copy-sync.md).
### ensureDir(dir)
Maps [`fsExtra.ensureDirSync`](https://github.com/jprichardson/node-fs-extra/blob/master/docs/ensureDir-sync.md).
### exists(path)
Maps [`fs.existsSync`](https://nodejs.org/api/fs.html#fs_fs_existssync_path).
### move(src, dest, [options])
Simulate a [`mv(1)`](http://man7.org/linux/man-pages/man1/mv.1.html) via a [`fsExtra.copySync`](https://github.com/jprichardson/node-fs-extra/blob/master/docs/copy-sync.md) and a [`fsExtra.removeSync`](https://github.com/jprichardson/node-fs-extra/blob/master/docs/remove-sync.md).
#### src
*Required*
Type: `string`
Path of dir/file to move.
#### dest
*Required*
Type: `string`
Path of destination.
#### options
Type: `Object`
`fsExtra.copySync` options.
### readdir(path[, options])
Maps [`fs.readdirSync`](https://nodejs.org/api/fs.html#fs_fs_readdirsync_path_options).
### readFile(path[, options])
Maps [`fs.readFileSync`](https://nodejs.org/api/fs.html#fs_fs_readfilesync_path_options).
### realpath(path[, options])
Maps [`fs.realpathSync`](https://nodejs.org/api/fs.html#fs_fs_realpathsync_path_options).
### remove(path)
Maps [`fsExtra.removeSync`](https://github.com/jprichardson/node-fs-extra/blob/master/docs/remove-sync.md).
### symlink(target, path[, type])
Maps [`fs.symlinkSync`](https://nodejs.org/api/fs.html#fs_fs_symlinksync_target_path_type).
### writeFile(file, data[, options])
Maps [`fs.writeFileSync`](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options).
## License
MIT © [Absolunet](https://absolunet.com)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc