mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:57:35 +00:00
LibCore: Stub out FileWatcher for Lagom platforms
Stub out the FileWatcher class with ENOTSUP stubs to let Services that require it to compile for Lagom. Later we should add real code for this using techniques like Linux's inotify(7).
This commit is contained in:
parent
1f5cef1319
commit
73742176a4
1 changed files with 24 additions and 0 deletions
|
@ -206,6 +206,30 @@ FileWatcher::~FileWatcher()
|
|||
dbgln_if(FILE_WATCHER_DEBUG, "Stopped watcher at fd {}", m_notifier->fd());
|
||||
}
|
||||
|
||||
#else
|
||||
// FIXME: Implement Core::FileWatcher for linux, macOS, and *BSD
|
||||
FileWatcher::~FileWatcher() { }
|
||||
FileWatcher::FileWatcher(int watcher_fd, NonnullRefPtr<Notifier> notifier)
|
||||
: FileWatcherBase(watcher_fd)
|
||||
, m_notifier(move(notifier))
|
||||
{
|
||||
}
|
||||
|
||||
ErrorOr<NonnullRefPtr<FileWatcher>> FileWatcher::create(InodeWatcherFlags)
|
||||
{
|
||||
return Error::from_errno(ENOTSUP);
|
||||
}
|
||||
|
||||
ErrorOr<bool> FileWatcherBase::add_watch(String, FileWatcherEvent::Type)
|
||||
{
|
||||
return Error::from_errno(ENOTSUP);
|
||||
}
|
||||
|
||||
ErrorOr<bool> FileWatcherBase::remove_watch(String)
|
||||
{
|
||||
return Error::from_errno(ENOTSUP);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue