-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathSSYPathWaiter.h
45 lines (35 loc) · 1.54 KB
/
SSYPathWaiter.h
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
38
39
40
41
42
43
44
45
#import <Cocoa/Cocoa.h>
// Usually you don't like to import headers into headers, but in this case we want
// anyone importing this header to have access to the SSYPathObserverChangeFlags
#import "SSYPathObserver.h"
@interface SSYPathWaiter : NSObject {
BOOL m_succeeded ;
}
/*!
@brief Blocks until a given path in the filesystem is changed
in a given way, or a given timeout, whichever comes first
@details "Deleted in the Unix sense" means that the vnode
has been removed. A file which has been trashed has not been
deleted in the Unix sense.
@param watchFlags An xor of one or more of the
SSYPathObserverChangeFlags defined in SSYPathObserverChangeFlags.h,
which specify the type(s) of changes to be considered
@result YES if one of the prescribed changes occurs to the file at the
given path before the timeout occurs, otherwise NO
*/
- (BOOL)blockUntilWatchFlags:(uint32_t)watchFlags
path:(NSString*)path
timeout:(NSTimeInterval)timeout ;
/*!
@brief Blocks until any one in a given set paths in the filesystem is
changed in a given way, or a given timeout, whichever comes first, unless no
file exists at any of the given paths
@details This method behaves the same as blockUntilWatchFlags:path:timeout:
except it watches multiple paths.
@result YES if one of the prescribed changes occurs to the file at one of
the given path before the timeout occurs, otherwise NO
*/
- (BOOL)blockUntilWatchFlags:(uint32_t)watchFlags
paths:(NSSet*)paths
timeout:(NSTimeInterval)timeout ;
@end