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 2.1.2 to 3.0.0

4

package.json
{
"name": "qiao-file",
"version": "2.1.2",
"version": "3.0.0",
"description": "nodejs file tool",

@@ -52,3 +52,3 @@ "keywords": [

},
"gitHead": "913e26b327dd9f1742beeda2fc6fcd3ec91c7512"
"gitHead": "438ac047332a912cceba9880d70ff1e89b135298"
}

@@ -31,6 +31,51 @@ ## qiao-file

## cmd
## api
复制,移动,删除文件或文件夹
### extname
获取文件的后缀
- filePath
- 类型: string
- 说明: 文件地址
- return
- 类型: string
- 说明: 文件后缀,例如.js
```javascript
const res = extname(filePath);
```
### isExists
判断文件或者文件夹是否存在
- fpath
- 类型: string
- 说明: 文件或者文件夹地址
- return
- 类型: boolean
- 说明: 结果
- true: 存在
```javascript
const res = await isExists(fpath);
```
### isDir
判断文件路径是否为文件夹
- fpath
- 类型: string
- 说明: 文件或者文件夹地址
- return
- 类型: boolean
- 说明: 结果
- true: 是文件夹
```javascript
const res = await isDir(fpath);
```
### cp

@@ -90,6 +135,2 @@

## dir
文件夹相关操作
### mkdir

@@ -186,6 +227,2 @@

```
```
```javascript

@@ -197,21 +234,2 @@ const dirpath = 'xx';

## file
文件相关操作
### extname
获取文件的后缀
- filePath
- 类型: string
- 说明: 文件地址
- return
- 类型: string
- 说明: 文件后缀,例如.js
```javascript
const res = extname(filePath);
```
### readFile

@@ -269,42 +287,10 @@

## is
## version
文件相关判断
### 0.1.8.20230407
### isDir
1. 优化测试用例和 readme
判断文件路径是否为文件夹
### 0.1.7.20230404
- fpath
- 类型: string
- 说明: 文件或者文件夹地址
- return
- 类型: boolean
- 说明: 结果
- true: 是文件夹
```javascript
const res = await isDir(fpath);
```
### isExists
判断文件或者文件夹是否存在
- fpath
- 类型: string
- 说明: 文件或者文件夹地址
- return
- 类型: boolean
- 说明: 结果
- true: 存在
```javascript
const res = await isExists(fpath);
```
## version
## 0.1.7.20230404
1. add ava

@@ -311,0 +297,0 @@ 2. readDir --> readdir

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