refactor: misc minor clean-ups
This commit is contained in:
parent
aa4e2920dd
commit
6f8cfc946b
2 changed files with 4 additions and 5 deletions
|
|
@ -173,7 +173,7 @@ pub fn arm(self: *@This(), allocator: std.mem.Allocator) error{ OutOfMemory, Arm
|
||||||
) orelse return error.ArmFailed;
|
) orelse return error.ArmFailed;
|
||||||
errdefer cf.FSEventStreamRelease(stream);
|
errdefer cf.FSEventStreamRelease(stream);
|
||||||
|
|
||||||
const queue = cf.dispatch_queue_create("flow.file_watcher", null);
|
const queue = cf.dispatch_queue_create("nightwatch", null);
|
||||||
cf.FSEventStreamSetDispatchQueue(stream, queue);
|
cf.FSEventStreamSetDispatchQueue(stream, queue);
|
||||||
_ = cf.FSEventStreamStart(stream);
|
_ = cf.FSEventStreamStart(stream);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,16 +5,15 @@ pub const EventType = enum {
|
||||||
created,
|
created,
|
||||||
modified,
|
modified,
|
||||||
deleted,
|
deleted,
|
||||||
/// Only produced on macOS and Windows where the OS gives no pairing info.
|
/// kqueue, FSEvents and Windows emit deleted and then created events for renames.
|
||||||
/// On Linux, paired renames are emitted as a rename event with both paths instead.
|
/// INotfiy emits a rename event with both paths instead.
|
||||||
renamed,
|
renamed,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const ObjectType = enum {
|
pub const ObjectType = enum {
|
||||||
file,
|
file,
|
||||||
dir,
|
dir,
|
||||||
/// The object type could not be determined (e.g. a deleted file on Windows
|
/// The object type is unknown on Windows when a file is deleted and no path exists to query.
|
||||||
/// where the path no longer exists to query).
|
|
||||||
unknown,
|
unknown,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue