@bettergi/types 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/modules/file.d.ts +14 -0
- package/modules/globalMethod.d.ts +1 -1
- package/package.json +1 -1
package/modules/file.d.ts
CHANGED
|
@@ -2,6 +2,20 @@ import { Mat } from "mirada/dist/src/types/opencv";
|
|
|
2
2
|
|
|
3
3
|
declare global {
|
|
4
4
|
namespace file {
|
|
5
|
+
/**
|
|
6
|
+
* 读取指定文件夹内所有文件和文件夹的路径(非递归方式)
|
|
7
|
+
* @param folderPath 文件路径(相对于脚本根目录)
|
|
8
|
+
* @since 0.44.8
|
|
9
|
+
*/
|
|
10
|
+
function readPathSync(folderPath: string): string[];
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* 判断指定路径是否为文件夹
|
|
14
|
+
* @param path 文件路径(相对于脚本根目录)
|
|
15
|
+
* @since 0.44.8
|
|
16
|
+
*/
|
|
17
|
+
function isFolder(path: string): boolean;
|
|
18
|
+
|
|
5
19
|
/**
|
|
6
20
|
* 读取文件文本(支持文件扩展名:`.txt`, `.json`, `.log`, `.csv`, `.xml`, `.html`, `.css`)
|
|
7
21
|
* @param path 文件路径(相对于脚本根目录)
|