android


FileError.NOT_FOUND_ERR in copyTo method


I try to copy file new.js if folder file:///android_asset/www/js/ by the following code:
copyDir(cordova.file.applicationDirectory + 'www/js/');
function copyDir(copyTo) {
try {
window.resolveLocalFileSystemURL(copyTo,
function(destinationDir) {
alert('destinationDir.name: ' + destinationDir.name);
window.resolveLocalFileSystemURL(cordova.file.dataDirectory + 'newZip/new.js',
function(file) {
alert('file: ' + file.name);
file.copyTo(destinationDir, "index_new.js", onResolveSuccess, onFail);
},
onFail);
},
onFail);
} catch (error) {
alert(error);
}
}
function onResolveSuccess(fileEntry) {
alert("Exist: " + fileEntry.name);
}
function onFail(error) {
alert("Fail: " + error.code);
}
But I get the error with a code 1:
Fail: 1
This error seems to be FileError.NOT_FOUND_ERR.
But why do I get this error?
If the string alert('file: ' + file.name); output is
file: new.js
and that means that file new.js is for sure found...

Related Links

Android error when add apply plugin: 'com.google.gms.google-services'
How to dispose a view which has been created with Platform.CreateRenderer ( )
Can I get a squared image from a ACTION_IMAGE_CAPTURE intent
Want to lock AppBarLayout for some fragments
Dark mask over a half of ImageView with adjustviewbounds parameter
Obtaining table names for sqlite SQL join in android
Android fail to encode avc
Floating action button in android not displaying correctly
Errors after updating Firebase UI dependencies
android maps “lagging” with few of marker on it
Fetch Image from server through volley in android
Android Save Image Exif Information goes Wrong in Marshmallow 6.0.1
Saving and getting Latitude and Longitude for a mp4 file in android 7.0
Android native library is slower than excutables
Android : Post to server success but okhttp return ECONNRESET (Connection reset by peer)
Cocos2D-Python to Android/iOS

Categories

HOME
eclipse
turing-machines
apache-flink
css3
redux-form
camera
oracle-apex-5
replace
access
javacc
soa
rds
dojo
babeljs
spring-session
banner
rcloud
pattern-matching
plist
windows-ce
mautic
cmdb
tput
cumulocity
coin3d
symfony-2.8
dynamic-sql
chargify
red5
easyphp
nim
delphi-xe5
lilypond
guzzle
dataflow-diagram
php-mysqlidb
pchart
flask-sqlalchemy
maze
gpio
shared
handler
spotipy
gitlab-api
code-snippets
contacts
sim-toolkit
reactivekit
release
projects-and-solutions
loading
chef-solo
kill
android-checkbox
strftime
httrack
proget
robomongo
reportservice2010
podscms
trojan
sundials
er-diagram
rackspace-cloud
docpad
omxplayer
hadoop-2.7.2
spring-cloud-feign
expectations
swizzling
shopping
kango-framework
sklearn-pandas
createprocess
phpgrid
ascii-art
concurrentmodification
linklabel
fiware-monitoring
include-guards
page.js
coda
canalyzer
haskell-warp
jquery-forms-plugin
shopizer
cakephp-2.7
procedural-programming
ghcjs
encryption-asymmetric
mdichild
verold
malformedurlexception
memset
extjs2
maven-scm
jammer
away3d
ice-cube
stacky
twisted.web
boost-msm
vfs
window-decoration
cgimage
virtualpathprovider
apache-commons-dbutils
urlrewriter
google-floodlight
instantiationexception
qtabbar
web-application-project
wysiwym
linfu-dynamicproxy
soappy

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile