feat: add basic command line executable
This commit is contained in:
parent
f3463dd0dc
commit
e4cc1b82fe
2 changed files with 152 additions and 1 deletions
|
|
@ -79,6 +79,13 @@ pub fn handle_read_ready(self: *@This()) !void {
|
|||
try self.backend.handle_read_ready(self.allocator);
|
||||
}
|
||||
|
||||
/// Returns the inotify file descriptor that should be polled for POLLIN
|
||||
/// before calling handle_read_ready(). Only available on Linux.
|
||||
pub fn poll_fd(self: *const @This()) std.posix.fd_t {
|
||||
comptime if (builtin.os.tag != .linux) @compileError("poll_fd is only available on Linux");
|
||||
return self.backend.inotify_fd;
|
||||
}
|
||||
|
||||
const Backend = switch (builtin.os.tag) {
|
||||
.linux => INotifyBackend,
|
||||
.macos => if (build_options.use_fsevents) FSEventsBackend else KQueueBackend,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue