Merged upstream

This commit is contained in:
Thomas Beverley 2017-01-30 13:08:03 +00:00
commit 76981d0dba
8 changed files with 26 additions and 16 deletions

View File

@ -109,6 +109,7 @@
- (void)stopDownload - (void)stopDownload
{ {
if (_task.state == NSURLSessionTaskStateRunning) {
[_task cancel]; [_task cancel];
NSError *error = [NSError errorWithDomain:@"RNFS" NSError *error = [NSError errorWithDomain:@"RNFS"
@ -118,6 +119,7 @@
}]; }];
return _params.errorCallback(error); return _params.errorCallback(error);
}
} }
@end @end

View File

@ -43,6 +43,8 @@ type StatResult = {
path: string; // The absolute path to the item path: string; // The absolute path to the item
size: string; // Size in bytes size: string; // Size in bytes
mode: number; // UNIX file mode mode: number; // UNIX file mode
ctime: number; // Created date
utime: number; // Updated date
isFile: () => boolean; // Is the file just a file? isFile: () => boolean; // Is the file just a file?
isDirectory: () => boolean; // Is the file a directory? isDirectory: () => boolean; // Is the file a directory?
}; };

View File

@ -9,7 +9,7 @@
#import "AppDelegate.h" #import "AppDelegate.h"
#import "RCTRootView.h" #import <React/RCTRootView.h>
@implementation AppDelegate @implementation AppDelegate

View File

@ -12,7 +12,7 @@
#import <RCTTest/RCTTestRunner.h> #import <RCTTest/RCTTestRunner.h>
#import "RCTAssert.h" #import <React/RCTAssert.h>
@interface IntegrationTestsTests : XCTestCase @interface IntegrationTestsTests : XCTestCase

View File

@ -20,6 +20,12 @@ First you need to install react-native-fs:
npm install react-native-fs --save npm install react-native-fs --save
``` ```
**Note:** If your react-native version is < 0.40 install with this tag instead:
```
npm install react-native-fs@2.0.1-rc.2 --save
```
### Adding automatically with react-native link ### Adding automatically with react-native link
At the command line, in your project folder, type: At the command line, in your project folder, type:

View File

@ -6,8 +6,8 @@
// Copyright (c) 2015 Johannes Lumpe. All rights reserved. // Copyright (c) 2015 Johannes Lumpe. All rights reserved.
// //
#import "RCTBridgeModule.h" #import <React/RCTBridgeModule.h>
#import "RCTLog.h" #import <React/RCTLog.h>
@interface RNFSManager : NSObject <RCTBridgeModule> @interface RNFSManager : NSObject <RCTBridgeModule>

View File

@ -7,11 +7,11 @@
// //
#import "RNFSManager.h" #import "RNFSManager.h"
#import "RCTBridge.h" #import <React/RCTBridge.h>
#import "NSArray+Map.h" #import "NSArray+Map.h"
#import "Downloader.h" #import "Downloader.h"
#import "Uploader.h" #import "Uploader.h"
#import "RCTEventDispatcher.h" #import <React/RCTEventDispatcher.h>
#import <CommonCrypto/CommonDigest.h> #import <CommonCrypto/CommonDigest.h>
@interface RNFSManager() @interface RNFSManager()

View File

@ -1,6 +1,6 @@
{ {
"name": "react-native-fs", "name": "react-native-fs",
"version": "2.0.1-rc.2", "version": "v2.1.0-rc.1",
"description": "Native filesystem access for react-native", "description": "Native filesystem access for react-native",
"main": "FS.common.js", "main": "FS.common.js",
"scripts": { "scripts": {
@ -29,7 +29,7 @@
}, },
"devDependencies": { "devDependencies": {
"flow-bin": "0.27.0", "flow-bin": "0.27.0",
"react": "^15.2.1", "react": "^15.4.2",
"react-native": "^0.30.0" "react-native": "^0.40.0"
} }
} }