summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCore/FileWatcherUnimplemented.cpp
blob: 2e12ac688f026ac13b7e3825f3e6c4ed202db16a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
 * Copyright (c) 2020, Itamar S. <itamar8910@gmail.com>
 * Copyright (c) 2021, the SerenityOS developers.
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#include "FileWatcher.h"
#include <LibCore/Notifier.h>
#include <errno.h>

namespace Core {

ErrorOr<NonnullRefPtr<FileWatcher>> FileWatcher::create(FileWatcherFlags)
{
    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);
}

}