-
Notifications
You must be signed in to change notification settings - Fork 262
/
Copy pathexpo-file-system+15.2.2.patch
51 lines (47 loc) · 1.98 KB
/
expo-file-system+15.2.2.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
diff --git a/node_modules/expo-file-system/ios/EXFileSystem/EXFileSystem.m b/node_modules/expo-file-system/ios/EXFileSystem/EXFileSystem.m
index a114c11..a1925f4 100644
--- a/node_modules/expo-file-system/ios/EXFileSystem/EXFileSystem.m
+++ b/node_modules/expo-file-system/ios/EXFileSystem/EXFileSystem.m
@@ -969,24 +969,6 @@ - (void)sendEventWithName:(NSString *)eventName body:(id)body
}
}
-- (NSDictionary<NSURLResourceKey, id> *)documentFileResourcesForKeys:(NSArray<NSURLResourceKey> *)keys
- error:(out NSError * __autoreleasing *)error
-{
- if (!keys.count) {
- return @{};
- }
-
- NSURL *documentDirectoryUrl = [NSURL fileURLWithPath:_documentDirectory];
- NSDictionary *results = [documentDirectoryUrl resourceValuesForKeys:keys
- error:error];
-
- if (!results) {
- return @{};
- }
-
- return results;
-}
-
#pragma mark - Public utils
- (EXFileSystemPermissionFlags)permissionsForURI:(NSURL *)uri
@@ -1048,19 +1030,13 @@ + (NSString *)generatePathInDirectory:(NSString *)directory withExtension:(NSStr
// '<ARCType> *__autoreleasing*' problem solution: https://stackoverflow.com/a/8862061/4337317
- (NSNumber *)totalDiskCapacityWithError:(out NSError * __autoreleasing *)error
{
- NSDictionary *results = [self documentFileResourcesForKeys:@[NSURLVolumeTotalCapacityKey]
- error:error];
-
- return results[NSURLVolumeTotalCapacityKey];
+ return @0;
}
// '<ARCType> *__autoreleasing*' problem solution: https://stackoverflow.com/a/8862061/4337317
- (NSNumber *)freeDiskStorageWithError:(out NSError * __autoreleasing *)error
{
- NSDictionary *results = [self documentFileResourcesForKeys:@[NSURLVolumeAvailableCapacityForImportantUsageKey]
- error:error];
-
- return results[NSURLVolumeAvailableCapacityForImportantUsageKey];
+ return @0;
}
@end