public function File::__construct in Zircon Profile 8
Same name in this branch
- 8 vendor/symfony/validator/Constraints/File.php \Symfony\Component\Validator\Constraints\File::__construct()
- 8 vendor/symfony/http-foundation/File/File.php \Symfony\Component\HttpFoundation\File\File::__construct()
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/File/File.php \Symfony\Component\HttpFoundation\File\File::__construct()
Constructs a new file from the given path.
Parameters
string $path The path to the file:
bool $checkPath Whether to check the path or not:
Throws
FileNotFoundException If the given path is not a file
2 calls to File::__construct()
- FakeFile::__construct in vendor/
symfony/ http-foundation/ Tests/ File/ FakeFile.php - Constructs a new file from the given path.
- UploadedFile::__construct in vendor/
symfony/ http-foundation/ File/ UploadedFile.php - Accepts the information of the uploaded file as provided by the PHP global $_FILES.
2 methods override File::__construct()
- FakeFile::__construct in vendor/
symfony/ http-foundation/ Tests/ File/ FakeFile.php - Constructs a new file from the given path.
- UploadedFile::__construct in vendor/
symfony/ http-foundation/ File/ UploadedFile.php - Accepts the information of the uploaded file as provided by the PHP global $_FILES.
File
- vendor/
symfony/ http-foundation/ File/ File.php, line 34
Class
- File
- A file in the file system.
Namespace
Symfony\Component\HttpFoundation\FileCode
public function __construct($path, $checkPath = true) {
if ($checkPath && !is_file($path)) {
throw new FileNotFoundException($path);
}
parent::__construct($path);
}