abla/fs/watch
Generated from source.
Import with import "abla/fs/watch".
Source: abla/fs/watch/entry.ab
fileWatchDirectory (fun)
fun fileWatchDirectory(path: string): string
The directory part of a path ("." for a bare name) and its last component.
fileWatchName (fun)
fun fileWatchName(path: string): string
Returns the text after the last slash, or the original path if there is no slash.
FileEvents (class)
class FileEvents(
var descriptor: int,
val paths: array<string>,
val directories: array<string>,
var watches: array<int>,
var handles: array<int>
)
descriptor is the inotify or kqueue descriptor (-1: none). On Linux watches holds each directory's watch number, directories its path; on macOS handles holds the open descriptors (the directories', then the files').
FileEvents.active (method)
fun active(): bool
Returns true if the watch has an open kernel event descriptor.
FileEvents.close (method)
fun close(): void
Closes the descriptors (a watch is not closed by itself: close it when done with it).
fileEvents (fun)
trusted fun fileEvents(paths: array<string>): FileEvents
Returns a watch for changes to the given paths, with an inactive watch if the host cannot create an event queue.
FileEvents.wait (extension fun)
trusted fun FileEvents.wait(milliseconds: int): bool
True once a change may have happened to one of the files, false when milliseconds passed without one.
Built from Abla v0.2.79 source ba5d6b7d. Examples and generated signatures follow that source revision.