declare type MkdirOptions = { NSURLIsExcludedFromBackupKey?: boolean; NSFileProtectionKey?: string; }; declare type FileOptions = { NSFileProtectionKey?: string; }; declare type ReadDirItem = { ctime?: Date; mtime?: Date; name: string; path: string; size: string; isFile: () => boolean; isDirectory: () => boolean; }; declare type StatResult = { name?: string; path: string; size: string; mode: number; ctime: number; mtime: number; originalFilepath: string; isFile: () => boolean; isDirectory: () => boolean; }; declare type Headers = { [name: string]: string; }; declare type Fields = { [name: string]: string; }; declare type DownloadFileOptions = { fromUrl: string; toFile: string; headers?: Headers; background?: boolean; discretionary?: boolean; cacheable?: boolean; progressInterval?: number; progressDivider?: number; begin?: (res: DownloadBeginCallbackResult) => void; progress?: (res: DownloadProgressCallbackResult) => void; resumable?: (res?: any) => void; connectionTimeout?: number; readTimeout?: number; backgroundTimeout?: number; }; declare type DownloadBeginCallbackResult = { jobId: number; statusCode: number; contentLength: number; headers: Headers; }; declare type DownloadProgressCallbackResult = { jobId: number; contentLength: number; bytesWritten: number; }; declare type DownloadResult = { jobId: number; statusCode: number; bytesWritten: number; }; declare type UploadFileOptions = { toUrl: string; binaryStreamOnly?: boolean; files: UploadFileItem[]; headers?: Headers; fields?: Fields; method?: string; beginCallback?: (res: UploadBeginCallbackResult) => void; progressCallback?: (res: UploadProgressCallbackResult) => void; begin?: (res: UploadBeginCallbackResult) => void; progress?: (res: UploadProgressCallbackResult) => void; }; declare type UploadFileItem = { name: string; filename: string; filepath: string; filetype: string; }; declare type UploadBeginCallbackResult = { jobId: number; }; declare type UploadProgressCallbackResult = { jobId: number; totalBytesExpectedToSend: number; totalBytesSent: number; }; declare type UploadResult = { jobId: number; statusCode: number; headers: Headers; body: string; }; declare type FSInfoResult = { totalSpace: number; freeSpace: number; }; declare const RNFS: { mkdir(filepath: string, options?: MkdirOptions): Promise; moveFile(filepath: string, destPath: string, options?: FileOptions): Promise; copyFile(filepath: string, destPath: string, options?: FileOptions): Promise; pathForBundle(bundleNamed: string): Promise; pathForGroup(groupName: string): Promise; getFSInfo(): Promise; getAllExternalFilesDirs(): Promise; unlink(filepath: string): Promise; exists(filepath: string): Promise; stopDownload(jobId: number): void; resumeDownload(jobId: number): void; isResumable(jobId: number): Promise; stopUpload(jobId: number): void; completeHandlerIOS(jobId: number): void; readDir(dirpath: string): Promise; readDirAssets(dirpath: string): Promise; existsAssets(filepath: string): any; existsRes(filename: string): any; readdir(dirpath: string): Promise; setReadable(filepath: string, readable: boolean, ownerOnly: boolean): Promise; stat(filepath: string): Promise; readFile(filepath: string, encodingOrOptions?: any): Promise; read(filepath: string, length?: number, position?: number, encodingOrOptions?: any): Promise; readFileAssets(filepath: string, encodingOrOptions?: any): Promise; readFileRes(filename: string, encodingOrOptions?: any): Promise; hash(filepath: string, algorithm: string): Promise; copyFileAssets(filepath: string, destPath: string): any; copyFileRes(filename: string, destPath: string): any; copyAssetsFileIOS(imageUri: string, destPath: string, width: number, height: number, scale?: number, compression?: number, resizeMode?: string): Promise; copyAssetsVideoIOS(imageUri: string, destPath: string): Promise; writeFile(filepath: string, contents: string, encodingOrOptions?: any): Promise; appendFile(filepath: string, contents: string, encodingOrOptions?: any): Promise; write(filepath: string, contents: string, position?: number, encodingOrOptions?: any): Promise; downloadFile(options: DownloadFileOptions): { jobId: number; promise: Promise; }; uploadFiles(options: UploadFileOptions): { jobId: number; promise: Promise; }; touch(filepath: string, mtime?: Date, ctime?: Date): Promise; scanFile(path: string): Promise; MainBundlePath: any; CachesDirectoryPath: any; ExternalCachesDirectoryPath: any; DocumentDirectoryPath: any; DownloadDirectoryPath: any; ExternalDirectoryPath: any; ExternalStorageDirectoryPath: any; TemporaryDirectoryPath: any; LibraryDirectoryPath: any; PicturesDirectoryPath: any; FileProtectionKeys: any; }; export default RNFS;