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
{
if (_task.state == NSURLSessionTaskStateRunning) {
[_task cancel];
NSError *error = [NSError errorWithDomain:@"RNFS"
@ -118,6 +119,7 @@
}];
return _params.errorCallback(error);
}
}
@end

View File

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

View File

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

View File

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

View File

@ -20,6 +20,12 @@ First you need to install react-native-fs:
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
At the command line, in your project folder, type:

View File

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

View File

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

View File

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