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