{"version":3,"file":"FileSystem.types.js","sourceRoot":"","sources":["../src/FileSystem.types.ts"],"names":[],"mappings":"AA6CA,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,iCAAiB,CAAA;AACnB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB","sourcesContent":["export type DownloadOptions = {\n md5?: boolean;\n cache?: boolean;\n headers?: { [name: string]: string };\n};\n\nexport type DownloadResult = {\n uri: string;\n status: number;\n headers: { [name: string]: string };\n md5?: string;\n};\n\nexport type DownloadProgressCallback = (data: DownloadProgressData) => void;\n\nexport type DownloadProgressData = {\n totalBytesWritten: number;\n totalBytesExpectedToWrite: number;\n};\n\nexport type DownloadPauseState = {\n url: string;\n fileUri: string;\n options: DownloadOptions;\n resumeData?: string;\n};\n\nexport type FileInfo =\n | {\n exists: true;\n uri: string;\n size: number;\n isDirectory: boolean;\n modificationTime: number;\n md5?: string;\n }\n | {\n exists: false;\n uri: string;\n size: undefined;\n isDirectory: false;\n modificationTime: undefined;\n md5: undefined;\n };\n\nexport enum EncodingType {\n UTF8 = 'utf8',\n Base64 = 'base64',\n}\n\nexport type ReadingOptions = {\n encoding?: EncodingType | 'utf8' | 'base64';\n position?: number;\n length?: number;\n};\n\nexport type WritingOptions = {\n encoding?: EncodingType | 'utf8' | 'base64';\n};\n\nexport type ProgressEvent = {\n uuid: string;\n data: {\n totalBytesWritten: number;\n totalBytesExpectedToWrite: number;\n };\n};\n\ntype PlatformMethod = (...args: any[]) => Promise;\n\nexport interface ExponentFileSystemModule {\n readonly name: 'ExponentFileSystem';\n readonly documentDirectory: string | null;\n readonly cacheDirectory: string | null;\n readonly bundledAssets: string | null;\n readonly bundleDirectory: string | null;\n readonly getInfoAsync?: PlatformMethod;\n readonly readAsStringAsync?: PlatformMethod;\n readonly writeAsStringAsync?: PlatformMethod;\n readonly deleteAsync?: PlatformMethod;\n readonly moveAsync?: PlatformMethod;\n readonly copyAsync?: PlatformMethod;\n readonly makeDirectoryAsync?: PlatformMethod;\n readonly readDirectoryAsync?: PlatformMethod;\n readonly downloadAsync?: PlatformMethod;\n readonly downloadResumableStartAsync?: PlatformMethod;\n readonly downloadResumablePauseAsync?: PlatformMethod;\n readonly getContentUriAsync?: PlatformMethod;\n readonly getFreeDiskStorageAsync?: PlatformMethod;\n readonly getTotalDiskCapacityAsync?: PlatformMethod;\n startObserving?: () => void;\n stopObserving?: () => void;\n addListener: (eventName: string) => void;\n removeListeners: (count: number) => void;\n}\n"]}