1*753557f6STomasz Sapeta // Copyright 2016-present 650 Industries. All rights reserved.
2*753557f6STomasz Sapeta 
3*753557f6STomasz Sapeta #import <Foundation/Foundation.h>
4*753557f6STomasz Sapeta #import <ABI47_0_0ExpoModulesCore/ABI47_0_0EXExportedModule.h>
5*753557f6STomasz Sapeta #import <ABI47_0_0ExpoModulesCore/ABI47_0_0EXModuleRegistryConsumer.h>
6*753557f6STomasz Sapeta #import <ABI47_0_0ExpoModulesCore/ABI47_0_0EXEventEmitter.h>
7*753557f6STomasz Sapeta #import <ABI47_0_0ExpoModulesCore/ABI47_0_0EXFileSystemInterface.h>
8*753557f6STomasz Sapeta 
9*753557f6STomasz Sapeta @interface ABI47_0_0EXFileSystem : ABI47_0_0EXExportedModule <ABI47_0_0EXEventEmitter, ABI47_0_0EXModuleRegistryConsumer, ABI47_0_0EXFileSystemInterface>
10*753557f6STomasz Sapeta 
11*753557f6STomasz Sapeta @property (nonatomic, readonly) NSString *documentDirectory;
12*753557f6STomasz Sapeta @property (nonatomic, readonly) NSString *cachesDirectory;
13*753557f6STomasz Sapeta @property (nonatomic, readonly) NSString *bundleDirectory;
14*753557f6STomasz Sapeta 
15*753557f6STomasz Sapeta - (instancetype)initWithDocumentDirectory:(NSString *)documentDirectory cachesDirectory:(NSString *)cachesDirectory bundleDirectory:(NSString *)bundleDirectory;
16*753557f6STomasz Sapeta 
17*753557f6STomasz Sapeta - (ABI47_0_0EXFileSystemPermissionFlags)permissionsForURI:(NSURL *)uri;
18*753557f6STomasz Sapeta 
19*753557f6STomasz Sapeta - (BOOL)ensureDirExistsWithPath:(NSString *)path;
20*753557f6STomasz Sapeta 
21*753557f6STomasz Sapeta - (NSString *)generatePathInDirectory:(NSString *)directory withExtension:(NSString *)extension;
22*753557f6STomasz Sapeta 
23*753557f6STomasz Sapeta @end
24*753557f6STomasz Sapeta 
25*753557f6STomasz Sapeta @protocol ABI47_0_0EXFileSystemHandler
26*753557f6STomasz Sapeta 
27*753557f6STomasz Sapeta + (void)getInfoForFile:(NSURL *)fileUri
28*753557f6STomasz Sapeta            withOptions:(NSDictionary *)optionxs
29*753557f6STomasz Sapeta               resolver:(ABI47_0_0EXPromiseResolveBlock)resolve
30*753557f6STomasz Sapeta               rejecter:(ABI47_0_0EXPromiseRejectBlock)reject;
31*753557f6STomasz Sapeta 
32*753557f6STomasz Sapeta + (void)copyFrom:(NSURL *)from
33*753557f6STomasz Sapeta               to:(NSURL *)to
34*753557f6STomasz Sapeta         resolver:(ABI47_0_0EXPromiseResolveBlock)resolve
35*753557f6STomasz Sapeta         rejecter:(ABI47_0_0EXPromiseRejectBlock)reject;
36*753557f6STomasz Sapeta 
37*753557f6STomasz Sapeta @end
38*753557f6STomasz Sapeta 
39*753557f6STomasz Sapeta @interface NSData (ABI47_0_0EXFileSystem)
40*753557f6STomasz Sapeta 
41*753557f6STomasz Sapeta - (NSString *)md5String;
42*753557f6STomasz Sapeta 
43*753557f6STomasz Sapeta @end
44