これがないドキュメントの最新バージョンです!
Click here for the latest released version.
DirectoryReader
W3C ディレクトリとシステム仕様で定義されているファイルと、ディレクトリ内のディレクトリを一覧表示するオブジェクト。
メソッド
- readentries を示す: ディレクトリ内のエントリを読み取る。
サポートされているプラットフォーム
- アンドロイド
- ブラックベリー WebWorks (OS 5.0 およびより高い)
- iOS
- Windows Phone 7 と 8
- Windows 8
readentries を示す
このディレクトリ内のエントリを読み取る。
パラメーター:
successCallback: の配列が渡されるコールバック
[FileEntry](../fileentry/fileentry.html)
と[DirectoryEntry](../directoryentry/directoryentry.html)
オブジェクト。(機能)解り: ディレクトリ一覧を取得するときにエラーが発生した場合に実行されるコールバック。呼び出されると、
[FileError](../fileerror/fileerror.html)
オブジェクト。(機能)
簡単な例
function success(entries) {
var i;
for (i=0; i<entries.length; i++) {
console.log(entries[i].name);
}
}
function fail(error) {
alert("Failed to list directory contents: " + error.code);
}
// Get a directory reader
var directoryReader = dirEntry.createReader();
// Get a list of all the entries in the directory
directoryReader.readEntries(success,fail);