mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +00:00
LibCore: Move FileWatcher implementations into separate files
Rather than one big file with (eventually) all implementations for each OS, let's keep OS-specific implementations in their own files.
This commit is contained in:
parent
204257526c
commit
5bfc9daba1
3 changed files with 49 additions and 30 deletions
38
Userland/Libraries/LibCore/FileWatcherUnimplemented.cpp
Normal file
38
Userland/Libraries/LibCore/FileWatcherUnimplemented.cpp
Normal file
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Copyright (c) 2020, Itamar S. <itamar8910@gmail.com>
|
||||
* Copyright (c) 2021, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include "FileWatcher.h"
|
||||
#include <Kernel/API/InodeWatcherFlags.h>
|
||||
#include <LibCore/Notifier.h>
|
||||
#include <errno.h>
|
||||
|
||||
namespace Core {
|
||||
|
||||
ErrorOr<NonnullRefPtr<FileWatcher>> FileWatcher::create(InodeWatcherFlags)
|
||||
{
|
||||
return Error::from_errno(ENOTSUP);
|
||||
}
|
||||
|
||||
FileWatcher::FileWatcher(int watcher_fd, NonnullRefPtr<Notifier> notifier)
|
||||
: FileWatcherBase(watcher_fd)
|
||||
, m_notifier(move(notifier))
|
||||
{
|
||||
}
|
||||
|
||||
FileWatcher::~FileWatcher() = default;
|
||||
|
||||
ErrorOr<bool> FileWatcherBase::add_watch(DeprecatedString, FileWatcherEvent::Type)
|
||||
{
|
||||
return Error::from_errno(ENOTSUP);
|
||||
}
|
||||
|
||||
ErrorOr<bool> FileWatcherBase::remove_watch(DeprecatedString)
|
||||
{
|
||||
return Error::from_errno(ENOTSUP);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue