src/Bundle/Common/File/File.php 1 location
|
@@ 60-63 (lines=4) @@
|
57 |
|
{ |
58 |
|
$target = $this->getTargetFile($directory, $name); |
59 |
|
|
60 |
|
if (!@rename($this->getPathname(), $target)) { |
61 |
|
$error = error_get_last(); |
62 |
|
throw new FileException(sprintf('Could not rename the file "%s" (%s)', $this->getPathname(), strip_tags($error['message']))); |
63 |
|
} |
64 |
|
|
65 |
|
$this->customChmod($target); |
66 |
|
|
src/Bundle/Common/File/FileUpload.php 1 location
|
@@ 200-203 (lines=4) @@
|
197 |
|
if ($this->isValid()) { |
198 |
|
$target = $this->getTargetFile($directory, $name); |
199 |
|
|
200 |
|
if (!@move_uploaded_file($this->getPathname(), $target)) { |
201 |
|
$error = error_get_last(); |
202 |
|
throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s)', $this->getPathname(), $target, strip_tags($error['message']))); |
203 |
|
} |
204 |
|
|
205 |
|
$this->customChmod($target); |
206 |
|
|