@widget-js/core 0.11.4 → 0.11.6
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/dist/index.cjs +8 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1534,9 +1534,16 @@ interface IFileApi {
|
|
|
1534
1534
|
readDirectory(path: string, options?: ReadDirOptions): Promise<SystemFile[]>;
|
|
1535
1535
|
isDirectory(filePath: string): Promise<boolean>;
|
|
1536
1536
|
getFileType(filePath: string): Promise<FileTypeResult>;
|
|
1537
|
-
downloadUrl(url: string): Promise<string>;
|
|
1537
|
+
downloadUrl(url: string, savePath: string): Promise<string>;
|
|
1538
1538
|
exists(filePath: string): Promise<boolean>;
|
|
1539
1539
|
delete(filePath: string): Promise<boolean>;
|
|
1540
|
+
getDocumentFolder(filePath?: string): Promise<string>;
|
|
1541
|
+
/**
|
|
1542
|
+
* read file contents
|
|
1543
|
+
* @param filePath
|
|
1544
|
+
* @return base64 encoded string
|
|
1545
|
+
*/
|
|
1546
|
+
readFile(filePath: string): Promise<string>;
|
|
1540
1547
|
}
|
|
1541
1548
|
type FileApiMethods = keyof IFileApi;
|
|
1542
1549
|
declare const FileApi: IFileApi;
|
package/dist/index.js
CHANGED
|
@@ -2034,12 +2034,18 @@ var FileApiImpl = class extends BaseApi {
|
|
|
2034
2034
|
delete(filePath) {
|
|
2035
2035
|
return this.invokeMethod("delete", filePath);
|
|
2036
2036
|
}
|
|
2037
|
-
downloadUrl(url) {
|
|
2038
|
-
return this.invokeMethod("downloadUrl", url);
|
|
2037
|
+
downloadUrl(url, savePath) {
|
|
2038
|
+
return this.invokeMethod("downloadUrl", url, savePath);
|
|
2039
2039
|
}
|
|
2040
2040
|
exists(filePath) {
|
|
2041
2041
|
return this.invokeMethod("exists", filePath);
|
|
2042
2042
|
}
|
|
2043
|
+
readFile(filePath) {
|
|
2044
|
+
return this.invokeMethod("readFile", filePath);
|
|
2045
|
+
}
|
|
2046
|
+
getDocumentFolder(filePath) {
|
|
2047
|
+
return this.invokeMethod("getDocumentFolder", filePath);
|
|
2048
|
+
}
|
|
2043
2049
|
};
|
|
2044
2050
|
var FileApi = new FileApiImpl();
|
|
2045
2051
|
export {
|