deeke-script-app 1.7.0 → 1.7.2
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/.vscode/settings.json +1 -0
- package/@deekeScript/@type/Class/Global.d.ts +1 -1
- package/@deekeScript/@type/Class/Rect.d.ts +16 -16
- package/@deekeScript/@type/Class/UiSelector.d.ts +201 -201
- package/@deekeScript/@type/Class/WebSocket.d.ts +49 -49
- package/@deekeScript/@type/interface/Access.d.ts +104 -104
- package/@deekeScript/@type/interface/App.d.ts +101 -101
- package/@deekeScript/@type/interface/DeekeScriptJson.d.ts +13 -13
- package/@deekeScript/@type/interface/Device.d.ts +88 -88
- package/@deekeScript/@type/interface/Encrypt.d.ts +58 -58
- package/@deekeScript/@type/interface/Engines.d.ts +39 -39
- package/@deekeScript/@type/interface/Files.d.ts +283 -283
- package/@deekeScript/@type/interface/FloatDialogs.d.ts +41 -41
- package/@deekeScript/@type/interface/ForegroundServiceBridge.d.ts +31 -31
- package/@deekeScript/@type/interface/Hid.d.ts +342 -342
- package/@deekeScript/@type/interface/Http.d.ts +94 -43
- package/@deekeScript/@type/interface/Images.d.ts +71 -71
- package/@deekeScript/@type/interface/Java.d.ts +7 -7
- package/@deekeScript/@type/interface/KeyBoards.d.ts +27 -27
- package/@deekeScript/@type/interface/Log.d.ts +16 -16
- package/@deekeScript/@type/interface/MediaStore.d.ts +146 -146
- package/@deekeScript/@type/interface/NotificationBridge.d.ts +28 -28
- package/@deekeScript/@type/interface/SocketIOClient.d.ts +76 -76
- package/@deekeScript/@type/interface/Storage.d.ts +119 -119
- package/@deekeScript/@type/interface/System.d.ts +114 -114
- package/@deekeScript/@type/interface/UiObject.d.ts +197 -197
- package/README.md +67 -67
- package/deekeScript.json +670 -669
- package/deekeScript.schema.json +492 -0
- package/deekeScriptZipBuild +48 -48
- package/gulpfile +17 -17
- package/images/test/statistics.png +0 -0
- package/init +32 -32
- package/jsconfig.json +11 -11
- package/package.json +44 -43
- package/script/statistics/statistics.js +120 -120
- package/script/task.html +4 -4
- package/src/statistics/statistics.js +120 -120
- package/src/task/douyin_zan.js +89 -89
- package/src/task/dy.js +14 -14
- package/src/task/dyApp.js +7 -7
- package/src/task/tool.js +19 -19
- package/src/task.html +4 -4
- package/test.json +67 -0
- package/uglify-config.json +15 -15
- package/update-types.js +118 -0
|
@@ -1,283 +1,283 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
var Files: files;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
interface files {
|
|
6
|
-
/**
|
|
7
|
-
* 读取文件内容
|
|
8
|
-
* @param path 文件路径
|
|
9
|
-
* @return 文件内容,如果失败返回null
|
|
10
|
-
*/
|
|
11
|
-
public read(path: string): string | null;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* 写入内容到文件
|
|
15
|
-
* @param path 文件路径
|
|
16
|
-
* @param content 要写入的内容
|
|
17
|
-
* @return 成功返回true,失败返回false
|
|
18
|
-
*/
|
|
19
|
-
public write(path: string, content: string): boolean;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* 追加内容到文件
|
|
23
|
-
* @param path 文件路径
|
|
24
|
-
* @param content 要追加的内容
|
|
25
|
-
* @return 成功返回true,失败返回false
|
|
26
|
-
*/
|
|
27
|
-
public append(path: string, content: string): boolean;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* 删除文件或目录
|
|
31
|
-
* @param path 文件或目录路径
|
|
32
|
-
* @return 成功返回true,失败返回false
|
|
33
|
-
*/
|
|
34
|
-
public delete(path: string): boolean;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* 检查文件或目录是否存在
|
|
38
|
-
* @param path 文件或目录路径
|
|
39
|
-
* @return 存在返回true,不存在返回false
|
|
40
|
-
*/
|
|
41
|
-
public exists(path: string): boolean;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* 创建目录(包括父目录)
|
|
45
|
-
* @param path 目录路径
|
|
46
|
-
* @return 成功返回true,失败返回false
|
|
47
|
-
*/
|
|
48
|
-
public mkdirs(path: string): boolean;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* 列出目录中的文件
|
|
52
|
-
* @param path 目录路径
|
|
53
|
-
* @return 文件名数组
|
|
54
|
-
*/
|
|
55
|
-
public list(path: string): string[];
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* 列出目录中的文件(包含完整路径)
|
|
59
|
-
* @param path 目录路径
|
|
60
|
-
* @return 文件完整路径数组
|
|
61
|
-
*/
|
|
62
|
-
public listFiles(path: string): string[];
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* 复制文件
|
|
66
|
-
* @param source 源文件路径
|
|
67
|
-
* @param destination 目标文件路径
|
|
68
|
-
* @return 成功返回true,失败返回false
|
|
69
|
-
*/
|
|
70
|
-
public copy(source: string, destination: string): boolean;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* 移动文件
|
|
74
|
-
* @param source 源文件路径
|
|
75
|
-
* @param destination 目标文件路径
|
|
76
|
-
* @return 成功返回true,失败返回false
|
|
77
|
-
*/
|
|
78
|
-
public move(source: string, destination: string): boolean;
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* 获取文件大小(字节)
|
|
82
|
-
* @param path 文件路径
|
|
83
|
-
* @return 文件大小(字节),如果文件不存在或为目录返回-1
|
|
84
|
-
*/
|
|
85
|
-
public size(path: string): number;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* 检查路径是否为目录
|
|
89
|
-
* @param path 路径
|
|
90
|
-
* @return 是目录返回true,否则返回false
|
|
91
|
-
*/
|
|
92
|
-
public isDirectory(path: string): boolean;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* 检查路径是否为文件
|
|
96
|
-
* @param path 路径
|
|
97
|
-
* @return 是文件返回true,否则返回false
|
|
98
|
-
*/
|
|
99
|
-
public isFile(path: string): boolean;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* 获取文件名
|
|
103
|
-
* @param path 文件路径
|
|
104
|
-
* @return 文件名
|
|
105
|
-
*/
|
|
106
|
-
public getName(path: string): string;
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* 获取父目录路径
|
|
110
|
-
* @param path 文件路径
|
|
111
|
-
* @return 父目录路径
|
|
112
|
-
*/
|
|
113
|
-
public getParent(path: string): string;
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* 获取绝对路径
|
|
117
|
-
* @param path 文件路径
|
|
118
|
-
* @return 绝对路径
|
|
119
|
-
*/
|
|
120
|
-
public getAbsolutePath(path: string): string;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* 重命名文件或目录
|
|
124
|
-
* @param oldPath 旧路径
|
|
125
|
-
* @param newPath 新路径
|
|
126
|
-
* @return 成功返回true,失败返回false
|
|
127
|
-
*/
|
|
128
|
-
public rename(oldPath: string, newPath: string): boolean;
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* 获取最后修改时间
|
|
132
|
-
* @param path 文件路径
|
|
133
|
-
* @return 最后修改时间(毫秒),如果文件不存在返回-1
|
|
134
|
-
*/
|
|
135
|
-
public lastModified(path: string): number;
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* 从URI读取内容(支持content://和file://等URI)
|
|
139
|
-
* @param uriString URI字符串
|
|
140
|
-
* @return 内容,如果失败返回null
|
|
141
|
-
*/
|
|
142
|
-
public readUri(uriString: string): string | null;
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* 从URI读取字节数组(支持content://和file://等URI,用于读取图片等二进制文件)
|
|
146
|
-
* @param uriString URI字符串
|
|
147
|
-
* @return 字节数组,如果失败返回null
|
|
148
|
-
*/
|
|
149
|
-
public readBytesFromUri(uriString: string): number[] | null;
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* 从content URI获取真实文件路径
|
|
153
|
-
* @param uriString content URI字符串
|
|
154
|
-
* @return 真实文件路径,如果失败返回null
|
|
155
|
-
*/
|
|
156
|
-
public getPathFromUri(uriString: string): string | null;
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* 从文件读取字节数组
|
|
160
|
-
* @param path 文件路径
|
|
161
|
-
* @return 字节数组,如果失败返回null
|
|
162
|
-
*/
|
|
163
|
-
public readBytes(path: string): number[] | null;
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* 写入字节数组到文件
|
|
167
|
-
* @param path 文件路径
|
|
168
|
-
* @param bytes 要写入的字节数组
|
|
169
|
-
* @return 成功返回true,失败返回false
|
|
170
|
-
*/
|
|
171
|
-
public writeBytes(path: string, bytes: number[]): boolean;
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* 从URI复制文件到目标路径
|
|
175
|
-
* @param uriString 源URI字符串
|
|
176
|
-
* @param destination 目标文件路径
|
|
177
|
-
* @return 成功返回true,失败返回false
|
|
178
|
-
*/
|
|
179
|
-
public copyFromUri(uriString: string, destination: string): boolean;
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* 获取外部存储根目录路径
|
|
183
|
-
* @return 外部存储路径
|
|
184
|
-
*/
|
|
185
|
-
public getExternalStoragePath(): string;
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* 获取应用私有文件目录路径
|
|
189
|
-
* @return 文件目录路径
|
|
190
|
-
*/
|
|
191
|
-
public getFilesPath(): string;
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* 获取应用缓存目录路径
|
|
195
|
-
* @return 缓存目录路径
|
|
196
|
-
*/
|
|
197
|
-
public getCachePath(): string;
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* 获取应用外部私有文件目录路径
|
|
201
|
-
* @param type 文件目录类型(如"Pictures"、"Documents"),null表示根目录
|
|
202
|
-
* @return 外部文件目录路径
|
|
203
|
-
*/
|
|
204
|
-
public getExternalFilesPath(type: string | null): string;
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* 获取应用外部私有文件根目录路径
|
|
208
|
-
* @return 外部文件目录路径
|
|
209
|
-
*/
|
|
210
|
-
public getExternalFilesPath(): string;
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* 获取Download目录路径
|
|
214
|
-
* @return Download目录路径
|
|
215
|
-
*/
|
|
216
|
-
public getDownloadPath(): string;
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* 获取Pictures目录路径
|
|
220
|
-
* @return Pictures目录路径
|
|
221
|
-
*/
|
|
222
|
-
public getPicturesPath(): string;
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* 获取DCIM目录路径
|
|
226
|
-
* @return DCIM目录路径
|
|
227
|
-
*/
|
|
228
|
-
public getDCIMPath(): string;
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* 获取Movies目录路径
|
|
232
|
-
* @return Movies目录路径
|
|
233
|
-
*/
|
|
234
|
-
public getMoviesPath(): string;
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* 获取Music目录路径
|
|
238
|
-
* @return Music目录路径
|
|
239
|
-
*/
|
|
240
|
-
public getMusicPath(): string;
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* 获取Documents目录路径
|
|
244
|
-
* @return Documents目录路径
|
|
245
|
-
*/
|
|
246
|
-
public getDocumentsPath(): string;
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* 从assets读取文件
|
|
250
|
-
* @param fileName assets目录中的文件名
|
|
251
|
-
* @return 文件内容,如果失败返回null
|
|
252
|
-
*/
|
|
253
|
-
public readAsset(fileName: string): string | null;
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* 检查外部存储是否可用且可写
|
|
257
|
-
* @return 可用且可写返回true,否则返回false
|
|
258
|
-
*/
|
|
259
|
-
public isExternalStorageWritable(): boolean;
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* 检查外部存储是否可读
|
|
263
|
-
* @return 可读返回true,否则返回false
|
|
264
|
-
*/
|
|
265
|
-
public isExternalStorageReadable(): boolean;
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* 获取文件扩展名
|
|
269
|
-
* @param path 文件路径
|
|
270
|
-
* @return 文件扩展名(不含点),如果没有扩展名返回空字符串
|
|
271
|
-
*/
|
|
272
|
-
public getExtension(path: string): string;
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* 获取不带扩展名的文件名
|
|
276
|
-
* @param path 文件路径
|
|
277
|
-
* @return 不带扩展名的文件名
|
|
278
|
-
*/
|
|
279
|
-
public getNameWithoutExtension(path: string): string;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
export { };
|
|
283
|
-
|
|
1
|
+
declare global {
|
|
2
|
+
var Files: files;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
interface files {
|
|
6
|
+
/**
|
|
7
|
+
* 读取文件内容
|
|
8
|
+
* @param path 文件路径
|
|
9
|
+
* @return 文件内容,如果失败返回null
|
|
10
|
+
*/
|
|
11
|
+
public read(path: string): string | null;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 写入内容到文件
|
|
15
|
+
* @param path 文件路径
|
|
16
|
+
* @param content 要写入的内容
|
|
17
|
+
* @return 成功返回true,失败返回false
|
|
18
|
+
*/
|
|
19
|
+
public write(path: string, content: string): boolean;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 追加内容到文件
|
|
23
|
+
* @param path 文件路径
|
|
24
|
+
* @param content 要追加的内容
|
|
25
|
+
* @return 成功返回true,失败返回false
|
|
26
|
+
*/
|
|
27
|
+
public append(path: string, content: string): boolean;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 删除文件或目录
|
|
31
|
+
* @param path 文件或目录路径
|
|
32
|
+
* @return 成功返回true,失败返回false
|
|
33
|
+
*/
|
|
34
|
+
public delete(path: string): boolean;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 检查文件或目录是否存在
|
|
38
|
+
* @param path 文件或目录路径
|
|
39
|
+
* @return 存在返回true,不存在返回false
|
|
40
|
+
*/
|
|
41
|
+
public exists(path: string): boolean;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* 创建目录(包括父目录)
|
|
45
|
+
* @param path 目录路径
|
|
46
|
+
* @return 成功返回true,失败返回false
|
|
47
|
+
*/
|
|
48
|
+
public mkdirs(path: string): boolean;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 列出目录中的文件
|
|
52
|
+
* @param path 目录路径
|
|
53
|
+
* @return 文件名数组
|
|
54
|
+
*/
|
|
55
|
+
public list(path: string): string[];
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 列出目录中的文件(包含完整路径)
|
|
59
|
+
* @param path 目录路径
|
|
60
|
+
* @return 文件完整路径数组
|
|
61
|
+
*/
|
|
62
|
+
public listFiles(path: string): string[];
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* 复制文件
|
|
66
|
+
* @param source 源文件路径
|
|
67
|
+
* @param destination 目标文件路径
|
|
68
|
+
* @return 成功返回true,失败返回false
|
|
69
|
+
*/
|
|
70
|
+
public copy(source: string, destination: string): boolean;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* 移动文件
|
|
74
|
+
* @param source 源文件路径
|
|
75
|
+
* @param destination 目标文件路径
|
|
76
|
+
* @return 成功返回true,失败返回false
|
|
77
|
+
*/
|
|
78
|
+
public move(source: string, destination: string): boolean;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* 获取文件大小(字节)
|
|
82
|
+
* @param path 文件路径
|
|
83
|
+
* @return 文件大小(字节),如果文件不存在或为目录返回-1
|
|
84
|
+
*/
|
|
85
|
+
public size(path: string): number;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* 检查路径是否为目录
|
|
89
|
+
* @param path 路径
|
|
90
|
+
* @return 是目录返回true,否则返回false
|
|
91
|
+
*/
|
|
92
|
+
public isDirectory(path: string): boolean;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* 检查路径是否为文件
|
|
96
|
+
* @param path 路径
|
|
97
|
+
* @return 是文件返回true,否则返回false
|
|
98
|
+
*/
|
|
99
|
+
public isFile(path: string): boolean;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* 获取文件名
|
|
103
|
+
* @param path 文件路径
|
|
104
|
+
* @return 文件名
|
|
105
|
+
*/
|
|
106
|
+
public getName(path: string): string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* 获取父目录路径
|
|
110
|
+
* @param path 文件路径
|
|
111
|
+
* @return 父目录路径
|
|
112
|
+
*/
|
|
113
|
+
public getParent(path: string): string;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* 获取绝对路径
|
|
117
|
+
* @param path 文件路径
|
|
118
|
+
* @return 绝对路径
|
|
119
|
+
*/
|
|
120
|
+
public getAbsolutePath(path: string): string;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* 重命名文件或目录
|
|
124
|
+
* @param oldPath 旧路径
|
|
125
|
+
* @param newPath 新路径
|
|
126
|
+
* @return 成功返回true,失败返回false
|
|
127
|
+
*/
|
|
128
|
+
public rename(oldPath: string, newPath: string): boolean;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* 获取最后修改时间
|
|
132
|
+
* @param path 文件路径
|
|
133
|
+
* @return 最后修改时间(毫秒),如果文件不存在返回-1
|
|
134
|
+
*/
|
|
135
|
+
public lastModified(path: string): number;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* 从URI读取内容(支持content://和file://等URI)
|
|
139
|
+
* @param uriString URI字符串
|
|
140
|
+
* @return 内容,如果失败返回null
|
|
141
|
+
*/
|
|
142
|
+
public readUri(uriString: string): string | null;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* 从URI读取字节数组(支持content://和file://等URI,用于读取图片等二进制文件)
|
|
146
|
+
* @param uriString URI字符串
|
|
147
|
+
* @return 字节数组,如果失败返回null
|
|
148
|
+
*/
|
|
149
|
+
public readBytesFromUri(uriString: string): number[] | null;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* 从content URI获取真实文件路径
|
|
153
|
+
* @param uriString content URI字符串
|
|
154
|
+
* @return 真实文件路径,如果失败返回null
|
|
155
|
+
*/
|
|
156
|
+
public getPathFromUri(uriString: string): string | null;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* 从文件读取字节数组
|
|
160
|
+
* @param path 文件路径
|
|
161
|
+
* @return 字节数组,如果失败返回null
|
|
162
|
+
*/
|
|
163
|
+
public readBytes(path: string): number[] | null;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* 写入字节数组到文件
|
|
167
|
+
* @param path 文件路径
|
|
168
|
+
* @param bytes 要写入的字节数组
|
|
169
|
+
* @return 成功返回true,失败返回false
|
|
170
|
+
*/
|
|
171
|
+
public writeBytes(path: string, bytes: number[]): boolean;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* 从URI复制文件到目标路径
|
|
175
|
+
* @param uriString 源URI字符串
|
|
176
|
+
* @param destination 目标文件路径
|
|
177
|
+
* @return 成功返回true,失败返回false
|
|
178
|
+
*/
|
|
179
|
+
public copyFromUri(uriString: string, destination: string): boolean;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* 获取外部存储根目录路径
|
|
183
|
+
* @return 外部存储路径
|
|
184
|
+
*/
|
|
185
|
+
public getExternalStoragePath(): string;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* 获取应用私有文件目录路径
|
|
189
|
+
* @return 文件目录路径
|
|
190
|
+
*/
|
|
191
|
+
public getFilesPath(): string;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* 获取应用缓存目录路径
|
|
195
|
+
* @return 缓存目录路径
|
|
196
|
+
*/
|
|
197
|
+
public getCachePath(): string;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* 获取应用外部私有文件目录路径
|
|
201
|
+
* @param type 文件目录类型(如"Pictures"、"Documents"),null表示根目录
|
|
202
|
+
* @return 外部文件目录路径
|
|
203
|
+
*/
|
|
204
|
+
public getExternalFilesPath(type: string | null): string;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* 获取应用外部私有文件根目录路径
|
|
208
|
+
* @return 外部文件目录路径
|
|
209
|
+
*/
|
|
210
|
+
public getExternalFilesPath(): string;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* 获取Download目录路径
|
|
214
|
+
* @return Download目录路径
|
|
215
|
+
*/
|
|
216
|
+
public getDownloadPath(): string;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* 获取Pictures目录路径
|
|
220
|
+
* @return Pictures目录路径
|
|
221
|
+
*/
|
|
222
|
+
public getPicturesPath(): string;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* 获取DCIM目录路径
|
|
226
|
+
* @return DCIM目录路径
|
|
227
|
+
*/
|
|
228
|
+
public getDCIMPath(): string;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* 获取Movies目录路径
|
|
232
|
+
* @return Movies目录路径
|
|
233
|
+
*/
|
|
234
|
+
public getMoviesPath(): string;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* 获取Music目录路径
|
|
238
|
+
* @return Music目录路径
|
|
239
|
+
*/
|
|
240
|
+
public getMusicPath(): string;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* 获取Documents目录路径
|
|
244
|
+
* @return Documents目录路径
|
|
245
|
+
*/
|
|
246
|
+
public getDocumentsPath(): string;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* 从assets读取文件
|
|
250
|
+
* @param fileName assets目录中的文件名
|
|
251
|
+
* @return 文件内容,如果失败返回null
|
|
252
|
+
*/
|
|
253
|
+
public readAsset(fileName: string): string | null;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* 检查外部存储是否可用且可写
|
|
257
|
+
* @return 可用且可写返回true,否则返回false
|
|
258
|
+
*/
|
|
259
|
+
public isExternalStorageWritable(): boolean;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* 检查外部存储是否可读
|
|
263
|
+
* @return 可读返回true,否则返回false
|
|
264
|
+
*/
|
|
265
|
+
public isExternalStorageReadable(): boolean;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* 获取文件扩展名
|
|
269
|
+
* @param path 文件路径
|
|
270
|
+
* @return 文件扩展名(不含点),如果没有扩展名返回空字符串
|
|
271
|
+
*/
|
|
272
|
+
public getExtension(path: string): string;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* 获取不带扩展名的文件名
|
|
276
|
+
* @param path 文件路径
|
|
277
|
+
* @return 不带扩展名的文件名
|
|
278
|
+
*/
|
|
279
|
+
public getNameWithoutExtension(path: string): string;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export { };
|
|
283
|
+
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
var FloatDialogs: FloatDialogs;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
interface FloatDialogs {
|
|
6
|
-
/**
|
|
7
|
-
* 悬浮窗弹窗(需要开启悬浮窗权限)
|
|
8
|
-
* @param title 弹窗标题
|
|
9
|
-
* @param content 弹窗内容
|
|
10
|
-
*/
|
|
11
|
-
public show(title: string, content: string): void;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* 悬浮窗弹窗(需要开启悬浮窗权限)
|
|
15
|
-
* @param content 弹窗内容
|
|
16
|
-
*/
|
|
17
|
-
public show(content: string): void;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* toast 吐司,与System.toast区别是,可以后台弹出消息
|
|
21
|
-
*/
|
|
22
|
-
public toast(content: string): void;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* toastLong 吐司(时间更长),与System.toast区别是,可以后台弹出消息
|
|
26
|
-
*/
|
|
27
|
-
public toastLong(content: string): void;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* 设置悬浮窗是否可点击
|
|
31
|
-
* @param clickable 是否可点击
|
|
32
|
-
*/
|
|
33
|
-
public setFloatWindowClickable(clickable: boolean): void;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* 关闭FloatDialogs开启的所有弹窗
|
|
37
|
-
*/
|
|
38
|
-
public closeAll(): void;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export { };
|
|
1
|
+
declare global {
|
|
2
|
+
var FloatDialogs: FloatDialogs;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
interface FloatDialogs {
|
|
6
|
+
/**
|
|
7
|
+
* 悬浮窗弹窗(需要开启悬浮窗权限)
|
|
8
|
+
* @param title 弹窗标题
|
|
9
|
+
* @param content 弹窗内容
|
|
10
|
+
*/
|
|
11
|
+
public show(title: string, content: string): void;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 悬浮窗弹窗(需要开启悬浮窗权限)
|
|
15
|
+
* @param content 弹窗内容
|
|
16
|
+
*/
|
|
17
|
+
public show(content: string): void;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* toast 吐司,与System.toast区别是,可以后台弹出消息
|
|
21
|
+
*/
|
|
22
|
+
public toast(content: string): void;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* toastLong 吐司(时间更长),与System.toast区别是,可以后台弹出消息
|
|
26
|
+
*/
|
|
27
|
+
public toastLong(content: string): void;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 设置悬浮窗是否可点击
|
|
31
|
+
* @param clickable 是否可点击
|
|
32
|
+
*/
|
|
33
|
+
public setFloatWindowClickable(clickable: boolean): void;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 关闭FloatDialogs开启的所有弹窗
|
|
37
|
+
*/
|
|
38
|
+
public closeAll(): void;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { };
|