What is the sequence of events fired when File Explorer opens a directory?


  1. The directory to enumerate is opened. If the metadata cache isn't used, and the directory isn't already open (in parallel by this or another process), then the GetFileInfo event fires. Next, the OpenFile event fires.
  2. The EnumerateDirectory event fires one or more times.
  3. The CloseDirectoryEnumeration event fires after your EnumerateDirectory event handler reports that no more directory entries are available.
  4. The CloseFile event fires.

Note that when a user navigates to a directory, File Explorer will also attempt to read metadata and (depending on the file type) thumbnails from the files. This means that File Explorer often opens files in the directory being enumerated, and reads data from said files, during the enumeration process.

We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at support@callback.com.