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

qiao-file

Package Overview
Dependencies
Maintainers
1
Versions
71
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 1.0.6 to 1.0.7

10

index.js

@@ -23,3 +23,3 @@ "use strict";

},
}
},
);

@@ -197,6 +197,4 @@ }

// rm folder
for (let i = 0; i < files.length; i++)
fs.unlinkSync(files[i].path + files[i].name);
for (let i = 0; i < folders.length; i++)
fs.rmdirSync(folders[i].path + folders[i].name);
for (let i = 0; i < files.length; i++) fs.unlinkSync(files[i].path + files[i].name);
for (let i = 0; i < folders.length; i++) fs.rmdirSync(folders[i].path + folders[i].name);
fs.rmdirSync(fpath);

@@ -344,3 +342,3 @@

lines = null;
}
},
);

@@ -347,0 +345,0 @@ });

4

package.json
{
"name": "qiao-file",
"version": "1.0.6",
"version": "1.0.7",
"description": "nodejs file tool",

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

},
"gitHead": "10e87c4bb8a4dd7bde6ea4aac9ee50aa2ecb9fc2"
"gitHead": "f8c2c147554840b49cf1cd180efc474e6a1c2cc7"
}

@@ -13,15 +13,15 @@ # qiao-file

```javascript
"use strict";
'use strict';
var q = require("qiao-file");
var q = require('qiao-file');
var test = function () {
var folderPath = "./test/";
var filePath = "./qiao-file.js";
var folderPath = './test/';
var filePath = './qiao-file.js';
// cp folder
q.cp(folderPath, "./test1");
q.cp(folderPath, './test1');
// cp file
q.cp(filePath, "./1.js");
q.cp(filePath, './1.js');
};

@@ -35,9 +35,9 @@

```javascript
"use strict";
'use strict';
var q = require("qiao-file");
var q = require('qiao-file');
var test = function () {
var oldPath = "./test";
var newPath = "./test1";
var oldPath = './test';
var newPath = './test1';

@@ -54,9 +54,9 @@ var res = q.mv(oldPath, newPath);

```javascript
"use strict";
'use strict';
var q = require("qiao-file");
var q = require('qiao-file');
var test = function () {
var folderPath = "d:/test1/";
var filePath = "d:/test.png";
var folderPath = 'd:/test1/';
var filePath = 'd:/test.png';

@@ -78,8 +78,8 @@ // rm folder

```javascript
"use strict";
'use strict';
var q = require("qiao-file");
var q = require('qiao-file');
var test = function () {
var foldersAndFiles = q.lsdir("z:/workspaces/qiao.plugin.coder/");
var foldersAndFiles = q.lsdir('z:/workspaces/qiao.plugin.coder/');
console.log(foldersAndFiles);

@@ -94,8 +94,8 @@ };

```javascript
"use strict";
'use strict';
var q = require("qiao-file");
var q = require('qiao-file');
var test = function () {
var fileTree = q.lstree("./", ["node_modules"]);
var fileTree = q.lstree('./', ['node_modules']);
console.log(JSON.stringify(fileTree));

@@ -110,8 +110,8 @@ };

```javascript
"use strict";
'use strict';
var q = require("qiao-file");
var q = require('qiao-file');
var test = function () {
var folder = "d:/test1/test2/test3/test.js";
var folder = 'd:/test1/test2/test3/test.js';

@@ -129,8 +129,8 @@ q.mkdir(folder);

```javascript
"use strict";
'use strict';
var q = require("qiao-file");
var q = require('qiao-file');
var test = function () {
var filePath = "d:/test1/test2/test.js";
var filePath = 'd:/test1/test2/test.js';
var s = q.extname(filePath);

@@ -147,8 +147,8 @@

```javascript
"use strict";
'use strict';
var q = require("qiao-file");
var q = require('qiao-file');
var test = function () {
var filePath = "./index.js";
var filePath = './index.js';
var s = q.readFile(filePath);

@@ -165,10 +165,10 @@

```javascript
"use strict";
'use strict';
// q
var q = require("qiao-file");
var q = require('qiao-file');
// run
async function test() {
var filePath = "./rm.js";
var filePath = './rm.js';
q.readFileLineByLine(filePath, onLine, onClose);

@@ -185,3 +185,3 @@ }

function onClose() {
console.log("close");
console.log('close');
}

@@ -193,10 +193,10 @@ ```

```javascript
"use strict";
'use strict';
// q
var q = require("qiao-file");
var q = require('qiao-file');
// run
async function test() {
var filePath = "./rm.js";
var filePath = './rm.js';
var lines = await q.readFileLineByLineSync(filePath);

@@ -215,9 +215,9 @@ console.log(lines);

```javascript
"use strict";
'use strict';
var q = require("qiao-file");
var q = require('qiao-file');
var test = function () {
var filePath = "./1.js";
q.writeFile(filePath, "2");
var filePath = './1.js';
q.writeFile(filePath, '2');
};

@@ -231,11 +231,11 @@

```javascript
"use strict";
'use strict';
// q
var q = require("qiao-file");
var q = require('qiao-file');
// run
async function test() {
var filePath = "./rm.js";
var destPath = "../dist/rm.js";
var filePath = './rm.js';
var destPath = '../dist/rm.js';
var lines = await q.readFileLineByLineSync(filePath);

@@ -257,8 +257,8 @@ q.writeFileFromLines(destPath, lines);

```javascript
"use strict";
'use strict';
var q = require("qiao-file");
var q = require('qiao-file');
var test = function () {
var fpath = "z:/workspaces/qiao.plugin.coder/lib/qiao.plugin.coder.js";
var fpath = 'z:/workspaces/qiao.plugin.coder/lib/qiao.plugin.coder.js';
var s = q.isExists(fpath);

@@ -265,0 +265,0 @@

@@ -66,6 +66,4 @@ // fs

// rm folder
for (let i = 0; i < files.length; i++)
fs.unlinkSync(files[i].path + files[i].name);
for (let i = 0; i < folders.length; i++)
fs.rmdirSync(folders[i].path + folders[i].name);
for (let i = 0; i < files.length; i++) fs.unlinkSync(files[i].path + files[i].name);
for (let i = 0; i < folders.length; i++) fs.rmdirSync(folders[i].path + folders[i].name);
fs.rmdirSync(fpath);

@@ -72,0 +70,0 @@

@@ -80,3 +80,3 @@ // fs

lines = null;
}
},
);

@@ -83,0 +83,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