← API Reference Class

asge::filesystem::_linux::FileWatcher

#include <FileWatcher.hpp>

Inherits from asge::concurrent::Thread.

Inheritance

classDiagram
    class N2["asge::concurrent::Thread"]
    class N1["asge::filesystem::_linux::FileWatcher"]
    N2 <|-- N1
    click N2 href "classasge_1_1concurrent_1_1Thread.html"
    click N1 href "classasge_1_1filesystem_1_1__linux_1_1FileWatcher.html"

Collaboration

classDiagram
    class N2["asge::concurrent::Thread"]
    class N1["asge::filesystem::_linux::FileWatcher"]
    N2 <|-- N1
    click N2 href "classasge_1_1concurrent_1_1Thread.html"
    click N1 href "classasge_1_1filesystem_1_1__linux_1_1FileWatcher.html"

Public Types

#using path_type = Path
#using mask_type = FEventType

Static Private Attributes

#static constexpr int MAX_EPOLL_EVENTS = 16private
#static constexpr int MILLISECONDS_TO_WAIT = 300private

Private Attributes

#handle_t m_InotifyHandleprivate
#handle_t m_EpollHandleprivate
#mutable std::mutex m_WatchesMtxprivate
#bool m_InotifyValid {false}private
#bool m_EpollValid {false}private
#signals::Signal< FileEvent const & > m_OnEventprivate
#std::unordered_map< path_type, handle_t, PathHash > m_WatchFdsprivate
#std::unordered_map< std::uint32_t, std::string > m_PendingMovesprivate

Private Member Functions

#bool isValid() const noexceptprivate
#BoolResult RegisterNewWatch(path_type inPath) noexceptprivate
#void ReadInotifyEvents()private
#void ConsumeInotifyEvent(inotify_event const *inEvent)private
#Result< path_type > GetParentPathFromWd(handle_t inWd) const noexceptprivate
#void Run(concurrent::context_pointer &inCtx) overrideprivate

Public Member Functions

#FileWatcher()
#FileWatcher(concurrent::context_pointer inCtx)
#~FileWatcher()
#Result< WatcherHandler > AddWatch(path_type inPath, _internal::callback_type_cref inCallback, mask_type inMask=mask_type::All)