mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-07 23:03:11 +08:00
Can't get the disk space until we get the disk space
This commit is contained in:
parent
be5c31ee1c
commit
64574be133
@ -17,7 +17,6 @@ function FileMgr()
|
|||||||
this.tempFolderPath = "../../tmp";
|
this.tempFolderPath = "../../tmp";
|
||||||
this.freeDiskSpace = -1;
|
this.freeDiskSpace = -1;
|
||||||
this.getFileBasePaths();
|
this.getFileBasePaths();
|
||||||
this.getFreeDiskSpace();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// private, called from Native Code
|
// private, called from Native Code
|
||||||
@ -193,8 +192,6 @@ FileReader.prototype.readAsText = function(file)
|
|||||||
}
|
}
|
||||||
this.fileName = file;
|
this.fileName = file;
|
||||||
navigator.fileMgr.addFileReader(this.fileName,this);
|
navigator.fileMgr.addFileReader(this.fileName,this);
|
||||||
//alert("Calling File.read : " + this.fileName);
|
|
||||||
//window.location = "gap://File.readFile/"+ file;
|
|
||||||
|
|
||||||
return FileUtil.read(fileName);
|
return FileUtil.read(fileName);
|
||||||
}
|
}
|
||||||
@ -225,14 +222,5 @@ FileWriter.prototype.writeAsText = function(file,text,bAppend)
|
|||||||
navigator.fileMgr.addFileWriter(file,this);
|
navigator.fileMgr.addFileWriter(file,this);
|
||||||
this.readyState = 0; // EMPTY
|
this.readyState = 0; // EMPTY
|
||||||
var call = FileUtil.write(file, text, bAppend);
|
var call = FileUtil.write(file, text, bAppend);
|
||||||
if(call > 0)
|
|
||||||
this.onerror();
|
|
||||||
else
|
|
||||||
this.oncomplete();
|
|
||||||
this.result = null;
|
this.result = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user