Skip to content

Module: List Files

Haoxi Tan edited this page Jan 7, 2020 · 2 revisions

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

Clone this wiki locally