Clone
2
Module: List Files
Haoxi Tan edited this page 2020-01-08 08:57:32 +10:00

Summary

  • Objective: List files via PhoneGap API

  • Authors: mh

  • Browsers: All

  • Code

Internal Working

Uses the PhoneGap API to inspect the file system.


// use directoryentry to create directory reader
function gotDirEntry(dirEntry) {
    var directoryReader = dirEntry.createReader();
    directoryReader.readEntries(success,fail);
}

// use getDirectoy to create reference to directoryentry
function gotFS(fileSystem) {
    fileSystem.root.getDirectory(directory, null, gotDirEntry, fail);
}

Feedback