Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

WindowsDirectoryWatcherMBS class

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class Folder Change Watching MBS Win Plugin 12.0 No Yes No Yes, Windows only No
Function: The class for watching folders on Windows for changes.
Notes: Create an object, add a few directories you want to watch and wait for changes being reported by NextChange method.

Feedback, Comments & Corrections

Flags

Constant Value Description
kNotifyChangeAttributes 4 Any attribute change in the watched directory or subtree causes a change notification wait operation to return.
kNotifyChangeCreation 64 Any change to the creation time of files in the watched directory or subtree causes a change notification wait operation to return.
kNotifyChangeDirName 2 Any directory-name change in the watched directory or subtree causes a change notification wait operation to return. Changes include creating or deleting a directory.
kNotifyChangeFilename 1 Any file name change in the watched directory or subtree causes a change notification wait operation to return. Changes include renaming, creating, or deleting a file.
kNotifyChangeLastAccess 32 Any change to the last access time of files in the watched directory or subtree causes a change notification wait operation to return.

Be careful: This flag is very performance consuming as you get a lot of events!
kNotifyChangeLastWrite 16 Any change to the last write-time of files in the watched directory or subtree causes a change notification wait operation to return. The operating system detects a change to the last write-time only when the file is written to the disk. For operating systems that use extensive caching, detection occurs only when the cache is sufficiently flushed.
kNotifyChangeSecurity 256 Any security-descriptor change in the watched directory or subtree causes a change notification wait operation to return.
kNotifyChangeSize 8 Any file-size change in the watched directory or subtree causes a change notification wait operation to return. The operating system detects a change in file size only when the file is written to the disk. For operating systems that use extensive caching, detection occurs only when the cache is sufficiently flushed.

This class has no sub classes.

Some examples which use this class:


The items on this page are in the following plugins: MBS Win Plugin.


WindowsDirectoryChangeMBS   -   WindowsDiscInfoMBS




Links
MBS Xojo Plugins