mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
setup parsing book, new styles
This commit is contained in:
parent
79ebd15c72
commit
06d1f95b67
195 changed files with 6543 additions and 1921 deletions
23
fpjs/old/utils.js
Normal file
23
fpjs/old/utils.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
FP.namespace("utils").createTempFile = (function(){
|
||||
var requestFileSystem = webkitRequestFileSystem || mozRequestFileSystem || requestFileSystem;
|
||||
|
||||
function createTempFile(callback) {
|
||||
var tmpFilename = "tmp.dat";
|
||||
requestFileSystem(TEMPORARY, 4 * 1024 * 1024 * 1024, function(filesystem) {
|
||||
function create() {
|
||||
filesystem.root.getFile(tmpFilename, {
|
||||
create : true
|
||||
}, function(zipFile) {
|
||||
callback(zipFile);
|
||||
});
|
||||
}
|
||||
|
||||
filesystem.root.getFile(tmpFilename, null, function(entry) {
|
||||
entry.remove(create, create);
|
||||
}, create);
|
||||
});
|
||||
}
|
||||
|
||||
return createTempFile
|
||||
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue