npm i --save native-script 处理文件新功能
- 版本:1.0.0
- GitHub:
- NPM: https://npmjs.net.cn/package/nativescript-handle-file-new
- 下载
- 昨日: 0
- 上周: 0
- 上个月: 0
native-script 处理文件
此模块为您提供了下载文件、选择保存文件夹并打开应用程序以打开文件的工具。
安装
tns plugin add nativescript-handle-file
如何使用
导入类并实例化。
import {HandleFile} from 'nativescript-handle-file';
let handleFile = new HandleFile();
handleFile.open({
name : "name-of-file.extension",
url: "path-to-file",
directory: "directory to save", // only in android [downloads, pictures, movies, music]
tittle: "title to choose apps" // only in android
}).then(result => {
//return true if success
})