WebStream/IO/FileOutputStream.php 1 location
|
@@ 54-56 (lines=3) @@
|
| 51 |
|
throw new IOException("Unable open " . $this->file->getFilePath()); |
| 52 |
|
} |
| 53 |
|
|
| 54 |
|
if (!flock($stream, LOCK_EX | LOCK_NB)) { |
| 55 |
|
throw new IOException("Cannot lock file: " . $this->file->getFilePath()); |
| 56 |
|
} |
| 57 |
|
|
| 58 |
|
parent::__construct($stream); |
| 59 |
|
} |
WebStream/IO/Writer/SimpleFileWriter.php 1 location
|
@@ 67-69 (lines=3) @@
|
| 64 |
|
throw new IOException("Unable open " . $this->filepath); |
| 65 |
|
} |
| 66 |
|
|
| 67 |
|
if (!flock($stream, LOCK_EX | LOCK_NB)) { |
| 68 |
|
throw new IOException("Cannot lock file: " . $this->filepath); |
| 69 |
|
} |
| 70 |
|
|
| 71 |
|
if (fwrite($stream, $data) === false) { |
| 72 |
|
flock($stream, LOCK_UN); |