acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
solaris_file_watcher.h
1
27
#pragma once
28
29
30
namespace
file_watcher
31
{
32
/
for
Linux based on inotify.
34
class
os_file_watcher :
public
file_watcher_impl
35
{
36
public
:
38
typedef
map_base < atom, atom, watch_struct *, watch_struct * >
WatchMap
;
39
40
public
:
43
os_file_watcher();
44
47
virtual
~os_file_watcher();
48
51
atom
add_watch
(
const
string
& directory,
file_watch_listener
* watcher,
bool
bRecursive);
52
54
void
erase_watch
(
const
string
& directory);
55
57
void
erase_watch
(
atom
watchid);
58
59
string
watch_path(
atom
watchid);
60
62
void
update
();
63
65
void
handle_action
(::file_watcher::file_watcher_impl::action * ptopic);
66
67
private
:
69
WatchMap
m_watchmap;
71
atom
mLastWatchID;
73
::i32 mFD;
75
struct
timeval mTimeOut;
77
fd_set mDescriptorSet;
78
79
80
};
81
82
83
}
// namespace file_watcher
84
atom
Definition
atom.h:237
file_watch_listener
file_watcher::os_file_watcher::handle_action
void handle_action(::file_watcher::file_watcher_impl::action *ptopic)
Handles the action.
Definition
solaris_file_watcher.cpp:210
file_watcher::os_file_watcher::WatchMap
map_base< atom, atom, watch_struct *, watch_struct * > WatchMap
type for a map_base from atom to watch_struct pointer
Definition
solaris_file_watcher.h:38
file_watcher::os_file_watcher::erase_watch
void erase_watch(const string &directory)
Remove a directory watch. This is a brute force lazy search O(nlogn).
file_watcher::os_file_watcher::update
void update()
Updates the watcher. Must be called often.
Definition
solaris_file_watcher.cpp:176
file_watcher::os_file_watcher::add_watch
atom add_watch(const string &directory, file_watch_listener *watcher, bool bRecursive)
Definition
solaris_file_watcher.cpp:77
file_watcher
Definition
solaris_file_watcher.cpp:34
operating_system
solaris
solaris_file_watcher.h
Generated by
1.17.0