- New method
FileUtils.copy()in substitution of methodcopyTo. This method use dependencycomons-io:comons-ioin replace of use raw methods with directly access ofInputStreamandOutputSteam.
PS: Some devices with Android 9+ got
Permission deniederror with theFileUtils.copyTo()method. Because this, the new methodcopy()was created.
-
Refactor errors return to
JS, inFileUtils.threadHelper(). Now, ajsonis returned with more information about the error/exception -
Added JUnit integration test using
Roboletric, to check if a file is copied successfully -
Refactor the method
FileUtils.initialize()to allow use theFileUtilsclass without cordova. This is great for unit tests.