Skip to content

[Android] Added new method FileUtils.copy()

Latest
Compare
Choose a tag to compare
@mfdeveloper mfdeveloper released this 15 Aug 12:01
· 0 commits to master since this release
  • New method FileUtils.copy() in substitution of method copyTo. This method use dependency comons-io:comons-io in replace of use raw methods with directly access of InputStream and OutputSteam.

PS: Some devices with Android 9+ got Permission denied error with the FileUtils.copyTo() method. Because this, the new method copy() was created.

  • Refactor errors return to JS, in FileUtils.threadHelper(). Now, a json is 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 the FileUtils class without cordova. This is great for unit tests.