UNPKG

@angelengineering/filepicker

Version:
27 lines (26 loc) 1.47 kB
import { MediaType } from './index.common'; import { File } from '@nativescript/core'; export { MediaType } from './index.common'; /** * @function getFreeMBs * Returns the number of megabytes free on file system containing the filepath * @param {string} filepath full filepath on device */ export declare function getFreeMBs(filepath: string): number; /** * @function filePicker * Present a system picker filtered by MediaType and using single or multiple selection mode.. * @param {MediaType} type OR'ed from all possible MediaType's to describe types of files allowed in selection * @param {boolean} multiple if multiple selections are allowed * @returns {Promise<File[]>} Promise<File[]> returns an array of Files selected by user */ export declare function filePicker(type: MediaType, multiple: boolean): Promise<File[]>; /** * @function galleryPicker * Present a Photos gallery picker filtered by MediaType and using single or multiple selection mode. Note: Android will just call showPicker currently. * @param {MediaType} type OR'ed from all possible MediaType's to describe types of files allowed in selection * @param {boolean} multiple if multiple selections are allowed * @returns {Promise<File[]>} Promise<File[]> Returns an array of Photos gallery files selected by user. */ export declare function galleryPicker(type: MediaType, multiple: boolean): Promise<File[]>; export declare function getPathFromURI(uri: android.net.Uri): any;