Module: List Files - h4sh5/beef GitHub Wiki

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