function gotFS(fileSystem) { fileSystem.root.getFile("readme.txt", {create: true}, gotFileEntry, fail); } function gotFileEntry(fileEntry) { fileEntry.createWriter(gotFileWriter, fail); } function gotFileWriter(writer) { writer.onwrite = function(evt) { console.log("write success"); }; writer.write("some sample text"); writer.abort(); // contents of file now 'some different text' } function onFileSystemSuccess(fileSystem) { console.log(fileSystem.name); var directoryEntry = fileSystem.root; directoryEntry.getDirectory($('.caseName_h').val(), {create: true, exclusive: false}, onDirectorySuccess, onDirectoryFail) } function onDirectorySuccess(parent) { console.log(parent); } function onDirectoryFail(error) { alert("Unable to create new directory: " + error.code); } function onFileSystemFail(evt) { console.log(evt.target.error.code); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)