Mercurial > hg > cmmr2012-drupal-site
comparison vendor/symfony/http-foundation/File/File.php @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children |
comparison
equal
deleted
inserted
replaced
3:307d7a7fd348 | 4:a9cd425dd02b |
---|---|
11 | 11 |
12 namespace Symfony\Component\HttpFoundation\File; | 12 namespace Symfony\Component\HttpFoundation\File; |
13 | 13 |
14 use Symfony\Component\HttpFoundation\File\Exception\FileException; | 14 use Symfony\Component\HttpFoundation\File\Exception\FileException; |
15 use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; | 15 use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; |
16 use Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesser; | |
16 use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser; | 17 use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser; |
17 use Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesser; | |
18 | 18 |
19 /** | 19 /** |
20 * A file in the file system. | 20 * A file in the file system. |
21 * | 21 * |
22 * @author Bernhard Schussek <bschussek@gmail.com> | 22 * @author Bernhard Schussek <bschussek@gmail.com> |
113 } | 113 } |
114 } elseif (!is_writable($directory)) { | 114 } elseif (!is_writable($directory)) { |
115 throw new FileException(sprintf('Unable to write in the "%s" directory', $directory)); | 115 throw new FileException(sprintf('Unable to write in the "%s" directory', $directory)); |
116 } | 116 } |
117 | 117 |
118 $target = rtrim($directory, '/\\').DIRECTORY_SEPARATOR.(null === $name ? $this->getBasename() : $this->getName($name)); | 118 $target = rtrim($directory, '/\\').\DIRECTORY_SEPARATOR.(null === $name ? $this->getBasename() : $this->getName($name)); |
119 | 119 |
120 return new self($target, false); | 120 return new self($target, false); |
121 } | 121 } |
122 | 122 |
123 /** | 123 /** |