npm i --save native-script-处理文件
- 版本:4.0.0
- GitHub: https://github.com/rafear/native-script-处理文件
- NPM: https://npmjs.net.cn/package/native-script-处理文件
- 下载
- 昨日: 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
})