") event for drag and drop, you can call [ ` DataTransferItem.webkitGetAsEntry() ` ](/en-US/docs/Web/API/DataTransferItem/webkitGetAsEntry) to get the [ ` FileSystemEntry ` ](/en-US/docs/Web/API/FileSystemEntry) for a dropped item. If the result isn't ` null ` , then it's a dropped file or directory, and you can use file system calls to work with it. 
  * The [ ` HTMLInputElement.webkitEntries ` ](/en-US/docs/Web/API/HTMLInputElement/webkitEntries) property lets you access the [ ` FileSystemFileEntry ` ](/en-US/docs/Web/API/FileSystemFileEntry) objects for the currently selected files, but only if they are dragged-and-dropped onto the file chooser ( [ Firefox bug 1326031 ](https://bugzil.la/1326031) ). If [ ` HTMLInputElement.webkitdirectory ` ](/en-US/docs/Web/API/HTMLInputElement/webkitdirectory) is ` true ` , the [ ` <input> ` ](/en-US/docs/Web/HTML/Element/input) element is instead a directory picker, and you get [ ` FileSystemDirectoryEntry ` ](/en-US/docs/Web/API/FileSystemDirectoryEntry) objects for each selected directory. 

##  Interfaces

The File and Directory Entries API includes the following interfaces:

[ ` FileSystem ` ](/en-US/docs/Web/API/FileSystem)

    

Represents a file system.

[ ` FileSystemEntry ` ](/en-US/docs/Web/API/FileSystemEntry)

    

The basic interface representing a single entry in a file system. This is
implemented by other interfaces which represent files or directories.

[ ` FileSystemFileEntry ` ](/en-US/docs/Web/API/FileSystemFileEntry)

    

Represents a single file in a file system.

[ ` FileSystemDirectoryEntry ` ](/en-US/docs/Web/API/FileSystemDirectoryEntry)

    

Represents a single directory in a file system.

[ ` FileSystemDirectoryReader ` ](/en-
US/docs/Web/API/FileSystemDirectoryReader)

    

Created by calling [ ` FileSystemDirectoryEntry.createReader() ` ](/en-
US/docs/Web/API/FileSystemDirectoryEntry/createReader) , this interface
provides the functionality which lets you read the contents of a directory.

##  Specifications

Specification  
---  
[ File and Directory Entries API  
#  api-domfilesystem  ](https://wicg.github.io/entries-api/#api-domfilesystem)  
  
##  Browser compatibility

BCD tables only load in the browser  with JavaScript enabled. Enable
JavaScript to view data.

##  See also

  * [ Introduction to the File and Directory Entries API ](/en-US/docs/Web/API/File_and_Directory_Entries_API/Introduction)
  * [ File and Directory Entries API support in Firefox ](/en-US/docs/Web/API/File_and_Directory_Entries_API/Firefox_support)

##  Help improve MDN

Was this page helpful to you?

Yes  No

[ Learn how to contribute
](https://github.com/mdn/content/blob/main/CONTRIBUTING.md "This will take you
to our contribution guidelines on GitHub.") .

This page was last modified on  Feb 26, 2023  by  [ MDN contributors ](/en-
US/docs/Web/API/File_and_Directory_Entries_API/contributors.txt) .

[ View this page on GitHub
](https://github.com/mdn/content/blob/main/files/en-
us/web/api/file_and_directory_entries_api/index.md?plain=1 "Folder: en-
us/web/api/file_and_directory_entries_api \(Opens in a new tab\)") â¢  [
Report a problem with this content
](https://github.com/mdn/content/issues/new?template=page-report.yml&mdn-
url=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-
US%2Fdocs%2FWeb%2FAPI%2FFile_and_Directory_Entries_API&metadata=%3C%21--+Do+not+make+changes+below+this+line+--%3E%0A%3Cdetails%3E%0A%3Csummary%3EPage+report+details%3C%2Fsummary%3E%0A%0A*+Folder%3A+%60en-
us%2Fweb%2Fapi%2Ffile_and_directory_entries_api%60%0A*+MDN+URL%3A+https%3A%2F%2Fdeveloper.mozilla.org%2Fen-
US%2Fdocs%2FWeb%2FAPI%2FFile_and_Directory_Entries_API%0A*+GitHub+URL%3A+https%3A%2F%2Fgithub.com%2Fmdn%2Fcontent%2Fblob%2Fmain%2Ffiles%2Fen-
us%2Fweb%2Fapi%2Ffile_and_directory_entries_api%2Findex.md%0A*+Last+commit%3A+https%3A%2F%2Fgithub.com%2Fmdn%2Fcontent%2Fcommit%2Fc6dbc4ff96451887b908b46c8e70bcfec1c2c48c%0A*+Document+last+modified%3A+2023-02-26T04%3A54%3A36.000Z%0A%0A%3C%2Fdetails%3E
"This