forked from JetBrains/phpstorm-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinotify.php
202 lines (194 loc) · 5.34 KB
/
inotify.php
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<?php
// Start of inotify v.0.1.6
/**
* (PHP >= 5.2.0, PECL inotify >= 0.1.2)<br/>
* Add a watch to an initialized inotify instance
*
* @link http://php.net/manual/en/function.inotify-add-watch.php
*
* @param resource $inotify_instance <p>resource returned by {@link http://php.net/manual/en/function.inotify-init.php inotify_init()}</p>
* @param string $pathname <p>File or directory to watch</p>
* @param int $mask <p>Events to watch for. See {@link http://php.net/manual/en/inotify.constants.php Predefined Constants}.</p>
*
* @return int a unique (<i>inotify</i> instance-wide) watch descriptor.
*/
function inotify_add_watch( $inotify_instance, $pathname, $mask )
{
}
/**
* (PHP >= 5.2.0, PECL inotify >= 0.1.2)<br/>
* Initialize an inotify instance for use with {@see inotify_add_watch}
*
* @link http://php.net/manual/en/function.inotify-init.php
* @return resource a stream resource or <b>FALSE</b> on error.
*/
function inotify_init()
{
}
/**
* (PHP >= 5.2.0, PECL inotify >= 0.1.2)<br/>
* This function allows to know if {@see inotify_read} will block or not.
* If a number upper than zero is returned, there are pending events
* and {@see inotify_read} will not block.
*
* @link http://php.net/manual/en/function.inotify-queue-len.php
*
* @param resource $inotify_instance <p>resource returned by {@link http://php.net/manual/en/function.inotify-init.php inotify_init()}</p>
*
* @return int a number greater than zero if events are pending, otherwise zero.
*/
function inotify_queue_len( $inotify_instance )
{
}
/**
* (PHP >= 5.2.0, PECL inotify >= 0.1.2)<br/>
* Read inotify events from an inotify instance.
*
* @link http://php.net/manual/en/function.inotify-read.php
*
* @param resource $inotify_instance <p>resource returned by {@link http://php.net/manual/en/function.inotify-init.php inotify_init()}</p>
*
* @return array an array of inotify events or <b>FALSE</b> if no events
* were pending and <i>inotify_instance</i> is non-blocking. Each event
* is an array with the following keys:
*
* <ul>
* <li><b>wd</b> is a watch descriptor returned by inotify_add_watch()</li>
* <li><b>mask</b> is a bit mask of events
* <li><b>cookie</b> is a unique id to connect related events (e.g. IN_MOVE_FROM and IN_MOVE_TO)
* <li><b>name</b> is the name of a file (e.g. if a file was modified in a watched directory)
* </ul>
*/
function inotify_read( $inotify_instance )
{
}
/**
* (PHP >= 5.2.0, PECL inotify >= 0.1.2)<br/>
* Removes the watch <i>$watch_descriptor</i> from the inotify instance <i>$inotify_instance</i>.
*
* @link http://php.net/manual/en/function.inotify-rm-watch.php
*
* @param resource $inotify_instance <p>resource returned by {@link http://php.net/manual/en/function.inotify-init.php inotify_init()}</p>
* @param int $watch_descriptor <p>watch to remove from the instance</p>
*
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function inotify_rm_watch( $inotify_instance, $watch_descriptor )
{
}
/**
* @type int
* @link http://php.net/manual/en/inotify.constants.php
*/
const IN_ACCESS = 1;
/**
* @type int
* @link http://php.net/manual/en/inotify.constants.php
*/
const IN_MODIFY = 2;
/**
* @type int
* @link http://php.net/manual/en/inotify.constants.php
*/
const IN_ATTRIB = 4;
/**
* @type int
* @link http://php.net/manual/en/inotify.constants.php
*/
const IN_CLOSE_WRITE = 8;
/**
* @type int
* @link http://php.net/manual/en/inotify.constants.php
*/
const IN_CLOSE_NOWRITE = 16;
/**
* @type int
* @link http://php.net/manual/en/inotify.constants.php
*/
const IN_OPEN = 32;
/**
* @type int
* @link http://php.net/manual/en/inotify.constants.php
*/
const IN_MOVED_FROM = 64;
/**
* @type int
* @link http://php.net/manual/en/inotify.constants.php
*/
const IN_MOVED_TO = 128;
/**
* @type int
* @link http://php.net/manual/en/inotify.constants.php
*/
const IN_CREATE = 256;
/**
* @type int
* @link http://php.net/manual/en/inotify.constants.php
*/
const IN_DELETE = 512;
/**
* @type int
* @link http://php.net/manual/en/inotify.constants.php
*/
const IN_DELETE_SELF = 1024;
/**
* @type int
* @link http://php.net/manual/en/inotify.constants.php
*/
const IN_MOVE_SELF = 2048;
/**
* @type int
* @link http://php.net/manual/en/inotify.constants.php
*/
const IN_UNMOUNT = 8192;
/**
* @type int
* @link http://php.net/manual/en/inotify.constants.php
*/
const IN_Q_OVERFLOW = 16384;
/**
* @type int
* @link http://php.net/manual/en/inotify.constants.php
*/
const IN_IGNORED = 32768;
/**
* @type int
* @link http://php.net/manual/en/inotify.constants.php
*/
const IN_CLOSE = 24;
/**
* @type int
* @link http://php.net/manual/en/inotify.constants.php
*/
const IN_MOVE = 192;
/**
* @type int
* @link http://php.net/manual/en/inotify.constants.php
*/
const IN_ALL_EVENTS = 4095;
/**
* @type int
* @link http://php.net/manual/en/inotify.constants.php
*/
const IN_ONLYDIR = 16777216;
/**
* @type int
* @link http://php.net/manual/en/inotify.constants.php
*/
const IN_DONT_FOLLOW = 33554432;
/**
* @type int
* @link http://php.net/manual/en/inotify.constants.php
*/
const IN_MASK_ADD = 536870912;
/**
* @type int
* @link http://php.net/manual/en/inotify.constants.php
*/
const IN_ISDIR = 1073741824;
/**
* @type int
* @link http://php.net/manual/en/inotify.constants.php
*/
const IN_ONESHOT = 2147483648;
// End of inotify v.0.1.6