files/en-us/web/api/filesystemdirectoryreader/readentries/index.md
{{APIRef("File and Directory Entries API")}}
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)
readEntries(successCallback, errorCallback)
successCallback
readEntries() on this
{{domxref("FileSystemDirectoryReader")}}, the array is empty.errorCallback {{optional_inline}}
None ({{jsxref("undefined")}}).
See DataTransferItem.webkitGetAsEntry() for example code that uses this method.
{{Specifications}}
{{Compat}}
In Chromium-based browsers, readEntries() will only return the first 100 FileSystemEntry instances. In order to obtain all of the
instances, readEntries() must be called multiple times.