--- title: FileSystemDirectoryReader.readEntries() slug: Web/API/FileSystemDirectoryReader/readEntries translation_of: Web/API/FileSystemDirectoryReader/readEntries ---
{{SeeCompatTable}}{{Non-standard_header}}
The {{domxref("FileSystemDirectoryReader")}} interface's readEntries()
method retrieves the directory entries within the directory being read and delivers them in an array to a provided callback function. The objects in the array are all based upon {{domxref("FileSystemEntry")}}. Generally, they are either {{domxref("FileSystemFileEntry")}} objects, which represent standard files, or {{domxref("FileSystemDirectoryEntry")}} objects, which represent directories.
readEntries(successCallback[, errorCallback]);
successCallback
readEntries()
on this {{domxref("FileSystemDirectoryReader")}}, the array is empty.errorCallback
{{optional_inline}}{{jsxref("undefined")}}.
{{page("/en-US/docs/Web/API/DataTransferItem/webkitGetAsEntry", "Example")}}
Specification | Status | Comment |
---|---|---|
{{SpecName('File System API')}} | {{Spec2('File System API')}} | Draft of proposed API |
This API has no official W3C or WHATWG specification.
{{Compat("api.FileSystemDirectoryReader.readEntries")}}