xref: /haiku/headers/private/storage/PathMonitor.h (revision 14e3d1b5768e7110b3d5c0855833267409b71dbb)
1 /*
2  * Copyright 2007, Haiku Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _PATH_MONITOR_H
6 #define _PATH_MONITOR_H
7 
8 
9 #include <NodeMonitor.h>
10 
11 
12 // additional flags (combined with those in NodeMonitor.h)
13 #define	B_WATCH_FILES_ONLY	0x0100
14 #define B_WATCH_RECURSIVELY	0x0200
15 
16 #define B_PATH_MONITOR		'_PMN'
17 
18 namespace BPrivate {
19 
20 class BPathMonitor {
21 	public:
22 		static status_t StartWatching(const char* path, uint32 flags, BMessenger target);
23 
24 		static status_t StopWatching(const char* path, BMessenger target);
25 		static status_t StopWatching(BMessenger target);
26 
27 	private:
28 		BPathMonitor();
29 		~BPathMonitor();
30 
31 		static status_t _InitIfNeeded();
32 };
33 
34 }	// namespace BPrivate
35 
36 #endif	// _PATH_MONITOR_H
37