npm i --save nativescript-handle-file-cghislai
- 版本:6.4.1-rc.1
- GitHub: https://github.com/rafear/nativescript-handle-file
- NPM: https://npmjs.net.cn/package/nativescript-handle-file-cghislai
- 下载
- 昨日下载量: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
})