This repository was archived by the owner on Mar 16, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -748,20 +748,17 @@ + (void) getPathFromUri:(NSString *)uri completionHandler:(void(^)(NSString * pa
748748
749749+(void ) df : (RCTResponseSenderBlock)callback
750750{
751- uint64_t totalSpace = 0 ;
752- uint64_t totalFreeSpace = 0 ;
753751 NSError *error = nil ;
754752 NSArray *paths = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES );
755753 NSDictionary *dictionary = [[NSFileManager defaultManager ] attributesOfFileSystemForPath: [paths lastObject ] error: &error];
756754
757755 if (dictionary) {
758756 NSNumber *fileSystemSizeInBytes = [dictionary objectForKey: NSFileSystemSize ];
759757 NSNumber *freeFileSystemSizeInBytes = [dictionary objectForKey: NSFileSystemFreeSize ];
760- totalSpace = [fileSystemSizeInBytes unsignedLongLongValue ];
761- totalFreeSpace = [freeFileSystemSizeInBytes unsignedLongLongValue ];
758+
762759 callback (@[[NSNull null ], @{
763- @" free" : [ NSNumber numberWithUnsignedLongLong: totalFreeSpace] ,
764- @" total" : [ NSNumber numberWithUnsignedLongLong: totalSpace] ,
760+ @" free" : freeFileSystemSizeInBytes ,
761+ @" total" : fileSystemSizeInBytes ,
765762 }]);
766763 } else {
767764 callback (@[@" failed to get storage usage." ]);
You can’t perform that action at this time.
0 commit comments