-
-
Save rightfold/cf87b53f3c8bb7c3f614abe2444b85ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function writeFile(path: string, content: Blob): void { | |
requestFileSystem(LocalFileSystem.PERSISTENT, 0, fs => { | |
fs.root.getFile(path, {create: true}, entry => { | |
entry.createWriter(writer => { | |
writer.write(content); | |
}); | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment