|
@@ -184,6 +184,20 @@ RCT_EXPORT_METHOD(createFileASCII:(NSString *)path data:(NSArray *)dataArray cal
|
184
|
184
|
|
185
|
185
|
}
|
186
|
186
|
|
|
187
|
+#pragma mark - fs.pathForAppGroup
|
|
188
|
+RCT_EXPORT_METHOD(pathForAppGroup:(NSString *)groupName
|
|
189
|
+ resolver:(RCTPromiseResolveBlock)resolve
|
|
190
|
+ rejecter:(RCTPromiseRejectBlock)reject)
|
|
191
|
+{
|
|
192
|
+ NSString * path = [RNFetchBlobFS getPathForAppGroup:groupName];
|
|
193
|
+
|
|
194
|
+ if(path) {
|
|
195
|
+ resolve(path);
|
|
196
|
+ } else {
|
|
197
|
+ reject(@"RNFetchBlob file not found", @"could not find path for app group", nil);
|
|
198
|
+ }
|
|
199
|
+}
|
|
200
|
+
|
187
|
201
|
#pragma mark - fs.exists
|
188
|
202
|
RCT_EXPORT_METHOD(exists:(NSString *)path callback:(RCTResponseSenderBlock)callback) {
|
189
|
203
|
[RNFetchBlobFS exists:path callback:callback];
|