Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions FS.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ var RNFS = {
return RNFSManager.pathForGroup(groupName);
},

pathForGroupSync(groupName: string): string {
return RNFSManager.pathForGroupSync(groupName);
},

getFSInfo(): Promise<FSInfoResult> {
return RNFSManager.getFSInfo();
},
Expand Down
5 changes: 5 additions & 0 deletions RNFSManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,11 @@ + (BOOL)requiresMainQueueSetup
}
}

RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(pathForGroupSync:(nonnull NSString *)groupId) {
NSURL *groupURL = [[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier: groupId];
return [groupURL path];
}

RCT_EXPORT_METHOD(getFSInfo:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
{
unsigned long long totalSpace = 0;
Expand Down
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export function copyFile(
): Promise<void>
export function pathForBundle(bundleNamed: string): Promise<string>
export function pathForGroup(groupName: string): Promise<string>
export function pathForGroupSync(groupName: string): string
export function getFSInfo(): Promise<FSInfoResult>
export function getAllExternalFilesDirs(): Promise<string[]>
export function unlink(filepath: string): Promise<void>
Expand Down