Lines Matching refs:handle
38 $handle = @fopen($filepath, 'r');
39 if (!$handle) {
47 if (flock($handle, LOCK_SH | LOCK_NB)) {
55 fclose($handle);
61 while (!feof($handle)) {
62 $contents .= fread($handle, 8192);
65 flock($handle, LOCK_UN);
66 fclose($handle);
111 $handle = @fopen($tempFile, 'w');
112 if (!$handle) {
118 if (!flock($handle, LOCK_EX)) {
119 fclose($handle);
125 $written = fwrite($handle, $json);
126 fflush($handle);
127 flock($handle, LOCK_UN);
128 fclose($handle);
200 $handle = @fopen($filepath, 'r+');
201 if (!$handle) {
209 if (flock($handle, LOCK_EX | LOCK_NB)) {
217 flock($handle, LOCK_UN);
219 fclose($handle);