ReadDirectoryChangesW(handle, size, bWatchSubtree, dwNotifyFilter, overlapped)
retrieves information describing the changes occurring within a directory.
CommentsIf you pass an overlapped object, you almost certainly must pass a buffer object for the asynchronous results - failure to do so may crash Python as the asynchronous result writes to invalid memory.
The FILE_NOTIFY_INFORMATION structure used by this function is variable length, depending on the length of the filename. The size of the buffer must be at least 6 bytes long + the length of the filenames returned. The number of notifications that can be returned for a given buffer size depends on the filename lengths.
Return ValueIf a buffer size is passed, the result is a list of (action, filename)
If a buffer is passed, the result is None - you must use the overlapped object to determine when the information is available and how much is valid. The buffer can then be passed to win32file::FILE_NOTIFY_INFORMATION