New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

qiao-file

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qiao-file - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

__tests__/mv.js

16

index.js

@@ -127,6 +127,19 @@ 'use strict';

/**
* mv
* @param {*} oldPath
* @param {*} newPath
*/
const mv = (oldPath, newPath) => {
try{
fs.renameSync(oldPath, newPath);
}catch(e){
console.log(e);
}
};
/**
* rm
* fpath, file or folder path, folder must end with /
*/
const rm = (fpath) => {
const rm = (fpath) => {
try{

@@ -246,3 +259,4 @@ // rm file

exports.mkdir = mkdir;
exports.mv = mv;
exports.readFile = readFile;
exports.rm = rm;

4

package.json
{
"name": "qiao-file",
"version": "0.2.0",
"version": "0.2.1",
"description": "nodejs file tool",

@@ -24,3 +24,3 @@ "author": "uikoo9 <uikoo9@qq.com>",

},
"gitHead": "f2e6182e1514994d92f6f492bcfdcdc79e665e35"
"gitHead": "ecc4ad7170e1362a9ef0a26b287b6db01425ee24"
}

@@ -24,2 +24,18 @@ # qiao-file

### mv
```javascript
'use strict';
var q = require('qiao-file');
var test = function(){
var oldPath = './test';
var newPath = './test1'
q.mv(oldPath, newPath);
};
test();
```
### rm

@@ -142,2 +158,3 @@ ```javascript

1. lstree path name
2. mv

@@ -144,0 +161,0 @@ ### 0.1.2.20220419

@@ -32,6 +32,19 @@ 'use strict';

/**
* mv
* @param {*} oldPath
* @param {*} newPath
*/
export const mv = (oldPath, newPath) => {
try{
fs.renameSync(oldPath, newPath);
}catch(e){
console.log(e);
}
};
/**
* rm
* fpath, file or folder path, folder must end with /
*/
export const rm = (fpath) => {
export const rm = (fpath) => {
try{

@@ -38,0 +51,0 @@ // rm file

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