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 @@ -758,20 +758,17 @@ + (void) getPathFromUri:(NSString *)uri completionHandler:(void(^)(NSString * pa
758758
759759+(void ) df : (RCTResponseSenderBlock)callback
760760{
761- uint64_t totalSpace = 0 ;
762- uint64_t totalFreeSpace = 0 ;
763761 NSError *error = nil ;
764762 NSArray *paths = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES );
765763 NSDictionary *dictionary = [[NSFileManager defaultManager ] attributesOfFileSystemForPath: [paths lastObject ] error: &error];
766764
767765 if (dictionary) {
768766 NSNumber *fileSystemSizeInBytes = [dictionary objectForKey: NSFileSystemSize ];
769767 NSNumber *freeFileSystemSizeInBytes = [dictionary objectForKey: NSFileSystemFreeSize ];
770- totalSpace = [fileSystemSizeInBytes unsignedLongLongValue ];
771- totalFreeSpace = [freeFileSystemSizeInBytes unsignedLongLongValue ];
768+
772769 callback (@[[NSNull null ], @{
773- @" free" : [ NSNumber numberWithUnsignedLongLong: totalFreeSpace] ,
774- @" total" : [ NSNumber numberWithUnsignedLongLong: totalSpace] ,
770+ @" free" : freeFileSystemSizeInBytes ,
771+ @" total" : fileSystemSizeInBytes ,
775772 }]);
776773 } else {
777774 callback (@[@" failed to get storage usage." ]);
You can’t perform that action at this time.
0 commit comments