- New method
FileUtils.copy()
in substitution of methodcopyTo
. This method use dependencycomons-io:comons-io
in replace of use raw methods with directly access ofInputStream
andOutputSteam
.
PS: Some devices with Android 9+ got
Permission denied
error with theFileUtils.copyTo()
method. Because this, the new methodcopy()
was created.
-
Refactor errors return to
JS
, inFileUtils.threadHelper()
. Now, ajson
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 theFileUtils
class without cordova. This is great for unit tests.