PollEventDriverWatchers

Generic directory watcher implementation based on periodic directory scanning.

Note that this implementation, although it works on all operating systems, is not efficient for directories with many files, since it has to keep a representation of the whole directory in memory and needs to list all files for each polling period, which can result in excessive hard disk activity.

Constructors

this
this(Events events)
Undocumented in source.

Members

Functions

addRef
void addRef(WatcherID descriptor)
Undocumented in source. Be warned that the author may not have intended to support it.
dispose
void dispose()
Undocumented in source. Be warned that the author may not have intended to support it.
isValid
bool isValid(WatcherID handle)
Undocumented in source. Be warned that the author may not have intended to support it.
rawUserData
void* rawUserData(WatcherID descriptor, size_t size, DataInitializer initialize, DataInitializer destroy)
Undocumented in source. Be warned that the author may not have intended to support it.
releaseRef
bool releaseRef(WatcherID descriptor)
Undocumented in source. Be warned that the author may not have intended to support it.
watchDirectory
WatcherID watchDirectory(string path, bool recursive, FileChangesCallback on_change)
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From EventDriverWatchers

watchDirectory
WatcherID watchDirectory(string path, bool recursive, FileChangesCallback callback)

Watches a directory or a directory sub tree for changes.

isValid
bool isValid(WatcherID handle)

Determines whether the given watcher handle is valid.

addRef
void addRef(WatcherID descriptor)

Increments the reference count of the given resource.

releaseRef
bool releaseRef(WatcherID descriptor)

Decrements the reference count of the given resource.

userData
WatcherID userData [@property setter]

Retrieves a reference to a user-defined value associated with a descriptor.

rawUserData
void* rawUserData(WatcherID descriptor, size_t size, DataInitializer initialize, DataInitializer destroy)

Low-level user data access. Use userData instead.

Meta