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

file-system

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

file-system - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

test/fs.js

2

Gruntfile.js

@@ -12,4 +12,2 @@ module.exports = function(grunt) {

});
};

@@ -63,4 +63,12 @@ /**

util.extend(exports, fs);
/**
* @description
* Assign node origin methods to fs
*/
exports.fs = fs;
/**
* @description
* Create dir, if dir don't exists, it will not throw error.

@@ -67,0 +75,0 @@ * And will mkdir for path, it is asynchronous.

{
"name": "file-system",
"version": "1.1.1",
"version": "1.1.2",
"description": "Strengthen the ability of file system",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -14,7 +14,16 @@ ## file-system

```
npm install file-system
npm install file-system --save
```
## API
### file.fs
file extend node fs origin methods, and overwrite some methods with next list chart
if you want to use origin method, choose file.fs[method]
```
file.existsSync === file.fs.existsSync // true
file.fs.mkdirSync // orign method
```
### file.mkdir

@@ -46,2 +55,6 @@ The api is same as node's mkdir

});
// Only using files
file.recurse('path', function(filepath, filename) {
if (!filename) return;
});
```

@@ -74,5 +87,11 @@

file.copySync('path', 'dest');
file.copySync('src', 'dest/src');
file.copySync('src', 'dest/src', { filter: ['*.js', 'path/**/*.css'] });
file.copySync('path', 'dest', { process: function(contents, filepath) {} });
//Handler self files
file.copySync('path', 'path', { filter: ['*.html.js'], process: function(contents, filepath) {} });
```

@@ -5,3 +5,2 @@ var util = require('util');

function isObject(arg) {

@@ -43,3 +42,2 @@ return toString.call(arg) == '[object Object]';

extend(exports, util);

@@ -46,0 +44,0 @@

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