Can you please tell me how does this know where the folder is created? I am checking in the emulator, I am going so much that I can see my folder. Can I check on the emulator? I'm using PhoneGap.
This is my code.
document.addEventListener ("deviceready", onDeviceReady, false); // Cordoba is a function on the device () {window.requestFileSystem (LocalFileSystem.PERSISTENT, 0, onFileSystemSuccess, onFileSystemFail); } File system system (file system) function {console.log (fileSystem.name); Var directory entry = filesystem.rote; DirectoryEntry.getDirectory ("newDir", {create: true, unique: incorrect}, onDirectorySuccess, onDirectoryFail)} onDirectorySuccess (parent) work on {console.log (parent); } Directory file (error) on the function {warning ("Unable to create new directory:" + error.code); } Function on file systemfile (evt) {console.log (evt.target.error.code); }
You are constantly using storage: LocalFileSystem.PERSISTENT < / Code>. This means that in a case where your phone has an external storage (SD card), fileSystem.root will point to the external storage route: file: /// sdcard . Otherwise, in a case where your phone does not have an SD card, fileSystem.root will indicate internal storage: file: /// data / data / $ PACKAGE_NAME . In addition, you can use fileSystem.root.fullPath to retrieve the path from the root path to DirectoryEntry. function on file system civet (file system) {console.log (fileSystem.name); Var directory entry = filesystem.rote; Console.log (directoryEntry.fullPath); I hope this will be helpful.
No comments:
Post a Comment