Skip to content

Commit 8d5112b

Browse files
Ron RadtkeRon Radtke
authored andcommitted
renaming everything?
1 parent 148e078 commit 8d5112b

File tree

92 files changed

+1051
-1051
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+1051
-1051
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.imdone
22
testconfig
3-
RNFetchBlobTest/
3+
ReactNativeBlobUtilTest/
44
test/test-server/public/*
55
!test/test-server/public/github.png
66

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
For developers who interested in making contribution to this project, please see [https://github.com/joltup/rn-fetch-blob-dev](https://github.com/joltup/rn-fetch-blob-dev) for more information.
1+
For developers who interested in making contribution to this project, please see [https://github.com/joltup/react-native-blob-util-dev](https://github.com/joltup/react-native-blob-util-dev) for more information.

README.md

Lines changed: 89 additions & 89 deletions
Large diffs are not rendered by default.

android.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,49 +4,49 @@
44

55
import { NativeModules, Platform } from 'react-native'
66

7-
const RNFetchBlob = NativeModules.RNFetchBlob
7+
const ReactNativeBlobUtil = NativeModules.ReactNativeBlobUtil
88

99
/**
1010
* Send an intent to open the file.
1111
* @param {string} path Path of the file to be open.
1212
* @param {string} mime MIME type string
13-
* @param {string} title for chooser, if not set the chooser won't be displayed (see https://developer.android.com/reference/android/content/Intent.html#createChooser(android.content.Intent,%20java.lang.CharSequence))
13+
* @param {string} chooserTitle for chooser, if not set the chooser won't be displayed (see https://developer.android.com/reference/android/content/Intent.html#createChooser(android.content.Intent,%20java.lang.CharSequence))
1414
* @return {Promise}
1515
*/
1616
function actionViewIntent(path, mime, chooserTitle) {
1717
if(typeof chooserTitle === 'undefined') chooserTitle = null;
1818
if(Platform.OS === 'android')
19-
return RNFetchBlob.actionViewIntent(path, mime, chooserTitle)
19+
return ReactNativeBlobUtil.actionViewIntent(path, mime, chooserTitle)
2020
else
21-
return Promise.reject('RNFetchBlob.android.actionViewIntent only supports Android.')
21+
return Promise.reject('ReactNativeBlobUtil.android.actionViewIntent only supports Android.')
2222
}
2323

2424
function getContentIntent(mime) {
2525
if(Platform.OS === 'android')
26-
return RNFetchBlob.getContentIntent(mime)
26+
return ReactNativeBlobUtil.getContentIntent(mime)
2727
else
28-
return Promise.reject('RNFetchBlob.android.getContentIntent only supports Android.')
28+
return Promise.reject('ReactNativeBlobUtil.android.getContentIntent only supports Android.')
2929
}
3030

3131
function addCompleteDownload(config) {
3232
if(Platform.OS === 'android')
33-
return RNFetchBlob.addCompleteDownload(config)
33+
return ReactNativeBlobUtil.addCompleteDownload(config)
3434
else
35-
return Promise.reject('RNFetchBlob.android.addCompleteDownload only supports Android.')
35+
return Promise.reject('ReactNativeBlobUtil.android.addCompleteDownload only supports Android.')
3636
}
3737

3838
function getSDCardDir() {
3939
if(Platform.OS === 'android')
40-
return RNFetchBlob.getSDCardDir()
40+
return ReactNativeBlobUtil.getSDCardDir()
4141
else
42-
return Promise.reject('RNFetchBlob.android.getSDCardDir only supports Android.')
42+
return Promise.reject('ReactNativeBlobUtil.android.getSDCardDir only supports Android.')
4343
}
4444

4545
function getSDCardApplicationDir() {
4646
if(Platform.OS === 'android')
47-
return RNFetchBlob.getSDCardApplicationDir()
47+
return ReactNativeBlobUtil.getSDCardApplicationDir()
4848
else
49-
return Promise.reject('RNFetchBlob.android.getSDCardApplicationDir only supports Android.')
49+
return Promise.reject('ReactNativeBlobUtil.android.getSDCardApplicationDir only supports Android.')
5050
}
5151

5252

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ dependencies {
4444
implementation 'com.squareup.okhttp3:okhttp:+'
4545
implementation 'com.squareup.okhttp3:logging-interceptor:+'
4646
implementation 'com.squareup.okhttp3:okhttp-urlconnection:+'
47-
// {RNFetchBlob_PRE_0.28_DEPDENDENCY}
47+
// {ReactNativeBlobUtil_PRE_0.28_DEPDENDENCY}
4848
}

android/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.RNFetchBlob">
2+
package="com.ReactNativeBlobUtil">
33

44
<!-- Required to access Google Play Licensing -->
55
<uses-permission android:name="com.android.vending.CHECK_LICENSE" />
@@ -27,7 +27,7 @@
2727
<application android:label="@string/app_name">
2828

2929
<provider
30-
android:name="com.RNFetchBlob.Utils.FileProvider"
30+
android:name="com.ReactNativeBlobUtil.Utils.FileProvider"
3131
android:authorities="${applicationId}.provider"
3232
android:exported="false"
3333
android:grantUriPermissions="true">

android/src/main/java/com/RNFetchBlob/RNFetchBlobConst.java

Lines changed: 0 additions & 19 deletions
This file was deleted.

android/src/main/java/com/RNFetchBlob/Response/RNFetchBlobDefaultResp.java renamed to android/src/main/java/com/ReactNativeBloBUtil/Response/RNFetchBlobDefaultResp.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package com.RNFetchBlob.Response;
1+
package com.ReactNativeBlobUtil.Response;
22

3-
import com.RNFetchBlob.RNFetchBlobConst;
4-
import com.RNFetchBlob.RNFetchBlobProgressConfig;
5-
import com.RNFetchBlob.RNFetchBlobReq;
3+
import com.ReactNativeBlobUtil.ReactNativeBlobUtilConst;
4+
import com.ReactNativeBlobUtil.ReactNativeBlobUtilProgressConfig;
5+
import com.ReactNativeBlobUtil.ReactNativeBlobUtilReq;
66
import com.facebook.react.bridge.Arguments;
77
import com.facebook.react.bridge.ReactApplicationContext;
88
import com.facebook.react.bridge.WritableMap;
@@ -22,14 +22,14 @@
2222
/**
2323
* Created by wkh237 on 2016/7/11.
2424
*/
25-
public class RNFetchBlobDefaultResp extends ResponseBody {
25+
public class ReactNativeBlobUtilDefaultResp extends ResponseBody {
2626

2727
String mTaskId;
2828
ReactApplicationContext rctContext;
2929
ResponseBody originalBody;
3030
boolean isIncrement = false;
3131

32-
public RNFetchBlobDefaultResp(ReactApplicationContext ctx, String taskId, ResponseBody body, boolean isIncrement) {
32+
public ReactNativeBlobUtilDefaultResp(ReactApplicationContext ctx, String taskId, ResponseBody body, boolean isIncrement) {
3333
this.rctContext = ctx;
3434
this.mTaskId = taskId;
3535
this.originalBody = body;
@@ -65,7 +65,7 @@ public long read(Buffer sink, long byteCount) throws IOException {
6565

6666
long read = mOriginalSource.read(sink, byteCount);
6767
bytesRead += read > 0 ? read : 0;
68-
RNFetchBlobProgressConfig reportConfig = RNFetchBlobReq.getReportProgress(mTaskId);
68+
ReactNativeBlobUtilProgressConfig reportConfig = ReactNativeBlobUtilReq.getReportProgress(mTaskId);
6969
long cLen = contentLength();
7070
if(reportConfig != null && cLen != 0 && reportConfig.shouldReport(bytesRead/contentLength())) {
7171
WritableMap args = Arguments.createMap();
@@ -80,7 +80,7 @@ public long read(Buffer sink, long byteCount) throws IOException {
8080
}
8181

8282
rctContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
83-
.emit(RNFetchBlobConst.EVENT_PROGRESS, args);
83+
.emit(ReactNativeBlobUtilConst.EVENT_PROGRESS, args);
8484
}
8585
return read;
8686
}

android/src/main/java/com/RNFetchBlob/Response/RNFetchBlobFileResp.java renamed to android/src/main/java/com/ReactNativeBloBUtil/Response/RNFetchBlobFileResp.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
package com.RNFetchBlob.Response;
1+
package com.ReactNativeBlobUtil.Response;
22

33
import androidx.annotation.NonNull;
44

5-
import com.RNFetchBlob.RNFetchBlobConst;
6-
import com.RNFetchBlob.RNFetchBlobProgressConfig;
7-
import com.RNFetchBlob.RNFetchBlobReq;
5+
import com.ReactNativeBlobUtil.ReactNativeBlobUtilConst;
6+
import com.ReactNativeBlobUtil.ReactNativeBlobUtilProgressConfig;
7+
import com.ReactNativeBlobUtil.ReactNativeBlobUtilReq;
88
import com.facebook.react.bridge.Arguments;
99
import com.facebook.react.bridge.ReactApplicationContext;
1010
import com.facebook.react.bridge.WritableMap;
@@ -25,7 +25,7 @@
2525
/**
2626
* Created by wkh237 on 2016/7/11.
2727
*/
28-
public class RNFetchBlobFileResp extends ResponseBody {
28+
public class ReactNativeBlobUtilFileResp extends ResponseBody {
2929

3030
String mTaskId;
3131
ResponseBody originalBody;
@@ -35,7 +35,7 @@ public class RNFetchBlobFileResp extends ResponseBody {
3535
FileOutputStream ofStream;
3636
boolean isEndMarkerReceived;
3737

38-
public RNFetchBlobFileResp(ReactApplicationContext ctx, String taskId, ResponseBody body, String path, boolean overwrite) throws IOException {
38+
public ReactNativeBlobUtilFileResp(ReactApplicationContext ctx, String taskId, ResponseBody body, String path, boolean overwrite) throws IOException {
3939
super();
4040
this.rctContext = ctx;
4141
this.mTaskId = taskId;
@@ -94,7 +94,7 @@ public long read(@NonNull Buffer sink, long byteCount) throws IOException {
9494
// End marker has been received for chunked download
9595
isEndMarkerReceived = true;
9696
}
97-
RNFetchBlobProgressConfig reportConfig = RNFetchBlobReq.getReportProgress(mTaskId);
97+
ReactNativeBlobUtilProgressConfig reportConfig = ReactNativeBlobUtilReq.getReportProgress(mTaskId);
9898

9999
if (contentLength() != 0) {
100100

@@ -130,7 +130,7 @@ private void reportProgress(String taskId, long bytesDownloaded, long contentLen
130130
args.putString("written", String.valueOf(bytesDownloaded));
131131
args.putString("total", String.valueOf(contentLength));
132132
rctContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
133-
.emit(RNFetchBlobConst.EVENT_PROGRESS, args);
133+
.emit(ReactNativeBlobUtilConst.EVENT_PROGRESS, args);
134134
}
135135

136136
@Override
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.RNFetchBlob.Utils;
1+
package com.ReactNativeBlobUtil.Utils;
22

33
public class FileProvider extends androidx.core.content.FileProvider {
44
}

0 commit comments

Comments
 (0)