Skip to content

Instantly share code, notes, and snippets.

@dch
Created May 27, 2011 10:03
Show Gist options
  • Save dch/994983 to your computer and use it in GitHub Desktop.
Save dch/994983 to your computer and use it in GitHub Desktop.
function onDeviceReady()
{
	// do your thing!
	//	navigator.notification.alert("CouchGap is working");
    window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onFileSystemSuccess, fail);
}

function onFileSystemSuccess(fileSystem) {
    console.log(fileSystem.name); // temporary / persistent
    console.log(fileSystem.root.name); // -Tmp- / Documents
    console.log(fileSystem.root.fullPath);
	/* in simulator:
	  /var/folders/ij/ijMHna+5EF4pjxw8tnMWyk+++TM/-Tmp-
	  /Users/dave/Library/Application Support/iPhone Simulator/4.3.2/Applications/5B5E26F0-BB54-4317-99CA-D9A4C8AB680E/Documents
	*/

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment