react-native-fs-turbo 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +0 -0
- package/README.md +0 -0
- package/RNFSTurbo.podspec +0 -0
- package/android/CMakeLists.txt +0 -0
- package/android/build.gradle +0 -0
- package/android/gradle.properties +0 -0
- package/android/src/main/AndroidManifest.xml +0 -0
- package/android/src/main/AndroidManifestNew.xml +0 -0
- package/android/src/main/codegen/RNFSTurboSpec.java +0 -0
- package/android/src/main/cpp/JNIOnLoad.cpp +0 -0
- package/android/src/main/cpp/RNFSTurboLogger.cpp +0 -0
- package/android/src/main/cpp/RNFSTurboModule.cpp +0 -0
- package/android/src/main/cpp/RNFSTurboModule.h +0 -0
- package/android/src/main/cpp/RNFSTurboPlatformHelper.cpp +0 -0
- package/android/src/main/java/com/cmpayc/rnfsturbo/JNIOnLoad.java +0 -0
- package/android/src/main/java/com/cmpayc/rnfsturbo/RNFSTurboDownloadParams.java +0 -0
- package/android/src/main/java/com/cmpayc/rnfsturbo/RNFSTurboDownloadResult.java +0 -0
- package/android/src/main/java/com/cmpayc/rnfsturbo/RNFSTurboDownloader.java +0 -0
- package/android/src/main/java/com/cmpayc/rnfsturbo/RNFSTurboIORejectionException.java +0 -0
- package/android/src/main/java/com/cmpayc/rnfsturbo/RNFSTurboModule.java +0 -0
- package/android/src/main/java/com/cmpayc/rnfsturbo/RNFSTurboPackage.java +0 -0
- package/android/src/main/java/com/cmpayc/rnfsturbo/RNFSTurboPlatformHelper.java +0 -0
- package/android/src/main/java/com/cmpayc/rnfsturbo/RNFSTurboUploadParams.java +0 -0
- package/android/src/main/java/com/cmpayc/rnfsturbo/RNFSTurboUploadResult.java +0 -0
- package/android/src/main/java/com/cmpayc/rnfsturbo/RNFSTurboUploader.java +0 -0
- package/cpp/RNFSTurboHostObject.cpp +11 -9
- package/cpp/RNFSTurboHostObject.h +0 -0
- package/cpp/RNFSTurboInstall.cpp +0 -0
- package/cpp/RNFSTurboInstall.h +0 -0
- package/cpp/RNFSTurboLogger.h +0 -0
- package/cpp/RNFSTurboPlatformHelper.h +0 -0
- package/cpp/algorithms/Krypt/AES.cpp +0 -0
- package/cpp/algorithms/Krypt/AES.hpp +0 -0
- package/cpp/algorithms/Krypt/aes-config.hpp +0 -0
- package/cpp/algorithms/Krypt/blockcipher.hpp +0 -0
- package/cpp/algorithms/Krypt/bytearray.cpp +0 -0
- package/cpp/algorithms/Krypt/bytearray.hpp +0 -0
- package/cpp/algorithms/Krypt/functions.cpp +0 -0
- package/cpp/algorithms/Krypt/functions.hpp +0 -0
- package/cpp/algorithms/Krypt/mode.cpp +0 -0
- package/cpp/algorithms/Krypt/mode.hpp +0 -0
- package/cpp/algorithms/Krypt/padding.cpp +0 -0
- package/cpp/algorithms/Krypt/padding.hpp +0 -0
- package/cpp/algorithms/Krypt/types.hpp +0 -0
- package/cpp/algorithms/base64.cpp +0 -0
- package/cpp/algorithms/base64.h +0 -0
- package/cpp/algorithms/md5.cpp +0 -0
- package/cpp/algorithms/md5.h +0 -0
- package/cpp/algorithms/sha1.cpp +0 -0
- package/cpp/algorithms/sha1.h +0 -0
- package/cpp/algorithms/sha224.cpp +0 -0
- package/cpp/algorithms/sha224.h +0 -0
- package/cpp/algorithms/sha256.cpp +0 -0
- package/cpp/algorithms/sha256.h +0 -0
- package/cpp/algorithms/sha384.cpp +0 -0
- package/cpp/algorithms/sha384.h +0 -0
- package/cpp/algorithms/sha512.cpp +0 -0
- package/cpp/algorithms/sha512.h +0 -0
- package/cpp/encryption/encryption-utils.cpp +0 -0
- package/cpp/encryption/encryption-utils.h +0 -0
- package/cpp/filesystem/filesystem-utils.cpp +0 -0
- package/cpp/filesystem/filesystem-utils.h +0 -0
- package/ios/PrivacyInfo.xcprivacy +0 -0
- package/ios/RNFSTurboDownloader.h +0 -0
- package/ios/RNFSTurboDownloader.mm +0 -0
- package/ios/RNFSTurboLogger.mm +0 -0
- package/ios/RNFSTurboModule.h +0 -0
- package/ios/RNFSTurboModule.mm +0 -0
- package/ios/RNFSTurboPlatformHelper.mm +0 -0
- package/ios/RNFSTurboUploader.h +0 -0
- package/ios/RNFSTurboUploader.mm +0 -0
- package/lib/commonjs/ModuleNotFoundError.js +0 -0
- package/lib/commonjs/ModuleNotFoundError.js.map +0 -0
- package/lib/commonjs/NativeRNFSTurboModule.js +0 -0
- package/lib/commonjs/NativeRNFSTurboModule.js.map +0 -0
- package/lib/commonjs/RNFSTurbo.js +0 -0
- package/lib/commonjs/RNFSTurbo.js.map +0 -0
- package/lib/commonjs/Types.js +0 -0
- package/lib/commonjs/Types.js.map +0 -0
- package/lib/commonjs/createRNFSTurbo.js +0 -0
- package/lib/commonjs/createRNFSTurbo.js.map +0 -0
- package/lib/commonjs/globals.d.js +0 -0
- package/lib/commonjs/globals.d.js.map +0 -0
- package/lib/commonjs/index.js +0 -0
- package/lib/commonjs/index.js.map +0 -0
- package/lib/commonjs/package.json +0 -0
- package/lib/module/ModuleNotFoundError.js +0 -0
- package/lib/module/ModuleNotFoundError.js.map +0 -0
- package/lib/module/NativeRNFSTurboModule.js +0 -0
- package/lib/module/NativeRNFSTurboModule.js.map +0 -0
- package/lib/module/RNFSTurbo.js +0 -0
- package/lib/module/RNFSTurbo.js.map +0 -0
- package/lib/module/Types.js +0 -0
- package/lib/module/Types.js.map +0 -0
- package/lib/module/createRNFSTurbo.js +0 -0
- package/lib/module/createRNFSTurbo.js.map +0 -0
- package/lib/module/globals.d.js +0 -0
- package/lib/module/globals.d.js.map +0 -0
- package/lib/module/index.js +0 -0
- package/lib/module/index.js.map +0 -0
- package/lib/module/package.json +0 -0
- package/lib/typescript/ModuleNotFoundError.d.ts +0 -0
- package/lib/typescript/ModuleNotFoundError.d.ts.map +0 -0
- package/lib/typescript/NativeRNFSTurboModule.d.ts +0 -0
- package/lib/typescript/NativeRNFSTurboModule.d.ts.map +0 -0
- package/lib/typescript/RNFSTurbo.d.ts +0 -0
- package/lib/typescript/RNFSTurbo.d.ts.map +0 -0
- package/lib/typescript/Types.d.ts +0 -0
- package/lib/typescript/Types.d.ts.map +0 -0
- package/lib/typescript/createRNFSTurbo.d.ts +0 -0
- package/lib/typescript/createRNFSTurbo.d.ts.map +0 -0
- package/lib/typescript/index.d.ts +0 -0
- package/lib/typescript/index.d.ts.map +0 -0
- package/package.json +1 -1
- package/react-native.config.js +0 -0
- package/src/ModuleNotFoundError.ts +0 -0
- package/src/NativeRNFSTurboModule.ts +0 -0
- package/src/RNFSTurbo.ts +0 -0
- package/src/Types.ts +0 -0
- package/src/createRNFSTurbo.ts +0 -0
- package/src/globals.d.ts +0 -0
- package/src/index.ts +0 -0
package/LICENSE
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
File without changes
|
package/RNFSTurbo.podspec
CHANGED
|
File without changes
|
package/android/CMakeLists.txt
CHANGED
|
File without changes
|
package/android/build.gradle
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -601,20 +601,22 @@ jsi::Value RNFSTurboHostObject::get(jsi::Runtime& runtime, const jsi::PropNameID
|
|
|
601
601
|
}
|
|
602
602
|
|
|
603
603
|
try {
|
|
604
|
+
struct stat t_stat;
|
|
605
|
+
bool fileExists = stat(filePath.c_str(), &t_stat) >= 0;
|
|
604
606
|
if (encoding == "uint8" || encoding == "uint16" || encoding == "uint32") {
|
|
605
|
-
if (propName == "write" && offset > -1 && encoding == "uint8") {
|
|
607
|
+
if (fileExists && propName == "write" && offset > -1 && encoding == "uint8") {
|
|
606
608
|
std::string replaceString(
|
|
607
609
|
reinterpret_cast<char*>(contentArrUint8),
|
|
608
610
|
contentLength
|
|
609
611
|
);
|
|
610
612
|
writeWithOffset(filePath.c_str(), replaceString, offset);
|
|
611
|
-
} else if (propName == "write" && offset > -1 && encoding == "uint16") {
|
|
613
|
+
} else if (fileExists && propName == "write" && offset > -1 && encoding == "uint16") {
|
|
612
614
|
std::string replaceString(
|
|
613
615
|
reinterpret_cast<char*>(contentArrUint16),
|
|
614
616
|
contentLength
|
|
615
617
|
);
|
|
616
618
|
writeWithOffset(filePath.c_str(), replaceString, offset);
|
|
617
|
-
} else if (propName == "write" && offset > -1 && encoding == "uint32") {
|
|
619
|
+
} else if (fileExists && propName == "write" && offset > -1 && encoding == "uint32") {
|
|
618
620
|
std::string replaceString(
|
|
619
621
|
reinterpret_cast<char*>(contentArrUint32),
|
|
620
622
|
contentLength
|
|
@@ -628,11 +630,11 @@ jsi::Value RNFSTurboHostObject::get(jsi::Runtime& runtime, const jsi::PropNameID
|
|
|
628
630
|
contentArrUint16,
|
|
629
631
|
contentArrUint32,
|
|
630
632
|
contentLength,
|
|
631
|
-
propName == "appendFile" || (propName == "write" && offset == -1)
|
|
633
|
+
fileExists && (propName == "appendFile" || (propName == "write" && offset == -1))
|
|
632
634
|
);
|
|
633
635
|
}
|
|
634
636
|
} else if (encoding == "float32") {
|
|
635
|
-
if (propName == "write" && offset > -1) {
|
|
637
|
+
if (fileExists && propName == "write" && offset > -1) {
|
|
636
638
|
std::string replaceString = reinterpret_cast<char*>(contentArrFloat32);
|
|
637
639
|
writeWithOffset(filePath.c_str(), replaceString, offset);
|
|
638
640
|
} else {
|
|
@@ -640,11 +642,11 @@ jsi::Value RNFSTurboHostObject::get(jsi::Runtime& runtime, const jsi::PropNameID
|
|
|
640
642
|
filePath.c_str(),
|
|
641
643
|
contentArrFloat32,
|
|
642
644
|
contentLength,
|
|
643
|
-
propName == "appendFile" || (propName == "write" && offset == -1)
|
|
645
|
+
fileExists && (propName == "appendFile" || (propName == "write" && offset == -1))
|
|
644
646
|
);
|
|
645
647
|
}
|
|
646
648
|
} else {
|
|
647
|
-
if (propName == "write" && offset > -1) {
|
|
649
|
+
if (fileExists && propName == "write" && offset > -1) {
|
|
648
650
|
writeWithOffset(
|
|
649
651
|
filePath.c_str(),
|
|
650
652
|
content,
|
|
@@ -673,14 +675,14 @@ jsi::Value RNFSTurboHostObject::get(jsi::Runtime& runtime, const jsi::PropNameID
|
|
|
673
675
|
writeFile(
|
|
674
676
|
filePath.c_str(),
|
|
675
677
|
encryptedContent,
|
|
676
|
-
propName == "appendFile" || (propName == "write" && offset == -1)
|
|
678
|
+
fileExists && (propName == "appendFile" || (propName == "write" && offset == -1))
|
|
677
679
|
);
|
|
678
680
|
#endif
|
|
679
681
|
} else {
|
|
680
682
|
writeFile(
|
|
681
683
|
filePath.c_str(),
|
|
682
684
|
content,
|
|
683
|
-
propName == "appendFile" || (propName == "write" && offset == -1)
|
|
685
|
+
fileExists && (propName == "appendFile" || (propName == "write" && offset == -1))
|
|
684
686
|
);
|
|
685
687
|
}
|
|
686
688
|
}
|
|
File without changes
|
package/cpp/RNFSTurboInstall.cpp
CHANGED
|
File without changes
|
package/cpp/RNFSTurboInstall.h
CHANGED
|
File without changes
|
package/cpp/RNFSTurboLogger.h
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/cpp/algorithms/base64.h
CHANGED
|
File without changes
|
package/cpp/algorithms/md5.cpp
CHANGED
|
File without changes
|
package/cpp/algorithms/md5.h
CHANGED
|
File without changes
|
package/cpp/algorithms/sha1.cpp
CHANGED
|
File without changes
|
package/cpp/algorithms/sha1.h
CHANGED
|
File without changes
|
|
File without changes
|
package/cpp/algorithms/sha224.h
CHANGED
|
File without changes
|
|
File without changes
|
package/cpp/algorithms/sha256.h
CHANGED
|
File without changes
|
|
File without changes
|
package/cpp/algorithms/sha384.h
CHANGED
|
File without changes
|
|
File without changes
|
package/cpp/algorithms/sha512.h
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/ios/RNFSTurboLogger.mm
CHANGED
|
File without changes
|
package/ios/RNFSTurboModule.h
CHANGED
|
File without changes
|
package/ios/RNFSTurboModule.mm
CHANGED
|
File without changes
|
|
File without changes
|
package/ios/RNFSTurboUploader.h
CHANGED
|
File without changes
|
package/ios/RNFSTurboUploader.mm
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/commonjs/Types.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/commonjs/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/module/RNFSTurbo.js
CHANGED
|
File without changes
|
|
File without changes
|
package/lib/module/Types.js
CHANGED
|
File without changes
|
package/lib/module/Types.js.map
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/module/globals.d.js
CHANGED
|
File without changes
|
|
File without changes
|
package/lib/module/index.js
CHANGED
|
File without changes
|
package/lib/module/index.js.map
CHANGED
|
File without changes
|
package/lib/module/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
package/react-native.config.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/RNFSTurbo.ts
CHANGED
|
File without changes
|
package/src/Types.ts
CHANGED
|
File without changes
|
package/src/createRNFSTurbo.ts
CHANGED
|
File without changes
|
package/src/globals.d.ts
CHANGED
|
File without changes
|
package/src/index.ts
CHANGED
|
File without changes
|