File tree 6 files changed +166
-86
lines changed
6 files changed +166
-86
lines changed Original file line number Diff line number Diff line change @@ -855,6 +855,18 @@ crash the app.
855
855
allowing a direct access to them with other methods in this library
856
856
(_e .g ._ [readFile ()]), even if the file is outside the app sandbox .
857
857
858
+ ** NOTE :** On ** iOS ** & ** macOS ** it resolve to special values with the format
859
+ & laquo ;` bookmark://<BASE64_ENCODED_STRING> ` & raquo ;, rather than normal URIs .
860
+ It is necessary for the support of security scopes
861
+ (see [Bookmarks and Security Scopes ](https :// developer.apple.com/documentation/foundation/nsurl#1663783)) in library methods. The «`<BASE64_ENCODED_STRING>`»
862
+ in this case is a Base64 - encoded binary representation of the URL bookmark ,
863
+ along with its security scope data . Other methods of the library are expected
864
+ to automatically handle such special URIs as needed .
865
+
866
+ ** BEWARE :** It has not been thoroughly verified yet that all library methods
867
+ support these & laquo ;Bookmark URLs & raquo ; correctly . The expected error in
868
+ such case is a failure to access the URLs as non - existing .
869
+
858
870
### read ()
859
871
[read ()]: #read
860
872
` ` ` ts
Original file line number Diff line number Diff line change 2
2
- boost (1.83.0)
3
3
- CocoaAsyncSocket (7.6.5)
4
4
- DoubleConversion (1.1.6)
5
- - dr-pogodin-react-native-fs (2.22.1 ):
5
+ - dr-pogodin-react-native-fs (2.22.2 ):
6
6
- glog
7
7
- hermes-engine
8
8
- RCT-Folly (= 2022.05.16.00)
@@ -1402,7 +1402,7 @@ SPEC CHECKSUMS:
1402
1402
boost: d3f49c53809116a5d38da093a8aa78bf551aed09
1403
1403
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
1404
1404
DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953
1405
- dr-pogodin-react-native-fs: 60d98fc542ed310f57d9b497628f6e72fa2d5e2a
1405
+ dr-pogodin-react-native-fs: 6aaacfa553d2a4be14cf32e4053725b7057155ee
1406
1406
dr-pogodin-react-native-static-server: a0ab88663817dfc8791b3e88295d0d9b6d212c5f
1407
1407
FBLazyVector: fbc4957d9aa695250b55d879c1d86f79d7e69ab4
1408
1408
Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44
@@ -1468,4 +1468,4 @@ SPEC CHECKSUMS:
1468
1468
1469
1469
PODFILE CHECKSUM: 2673e1121fca9666d2df5c7ba3b5b287e79ba95f
1470
1470
1471
- COCOAPODS: 1.14.3
1471
+ COCOAPODS: 1.15.0
Original file line number Diff line number Diff line change @@ -919,7 +919,7 @@ const tests: { [name: string]: StatusOrEvaluator } = {
919
919
} else {
920
920
if (
921
921
! isMatch ( e , {
922
- code : 'ENSCOCOAERRORDOMAIN260 ' ,
922
+ code : 'NSCocoaErrorDomain:260 ' ,
923
923
message :
924
924
'The file “non-existing-file.txt” couldn’t be opened because there is no such file.' ,
925
925
} )
Original file line number Diff line number Diff line change 6
6
- (RNFSException*) log ;
7
7
- (void ) reject : (RCTPromiseRejectBlock)reject ;
8
8
- (void ) reject : (RCTPromiseRejectBlock)reject details : (NSString *)details ;
9
- + (RNFSException*) from : (NSException *)exception ;
9
+
10
+ + (RNFSException*) fromError : (NSError *)error ;
11
+ + (RNFSException*) fromException : (NSException *)exception ;
12
+
10
13
+ (RNFSException*) name : (NSString *)name ;
11
14
+ (RNFSException*) name : (NSString *)name details : (NSString *)details ;
12
15
Original file line number Diff line number Diff line change @@ -40,13 +40,22 @@ - (void) reject: (RCTPromiseRejectBlock)reject details: (NSString*) details
40
40
reject (self.name , reason, [self error ]);
41
41
}
42
42
43
- + (RNFSException*) from : (NSException *)exception
43
+ + (RNFSException*) fromError : (NSError *)error
44
+ {
45
+ NSString *name = [NSString stringWithFormat: @" %@ :%ld " ,
46
+ error.domain, error.code];
47
+ return [[RNFSException alloc ]
48
+ initWithName: name
49
+ reason: error.localizedDescription
50
+ userInfo: error.userInfo];
51
+ }
52
+
53
+ + (RNFSException*) fromException : (NSException *)exception
44
54
{
45
55
return [[RNFSException alloc ]
46
56
initWithName: exception .name
47
57
reason: exception .reason
48
- userInfo: exception .userInfo
49
- ];
58
+ userInfo: exception .userInfo];
50
59
}
51
60
52
61
+ (RNFSException*) name : (NSString *)name
You can’t perform that action at this time.
0 commit comments