$realpath
$realpath :
A file in the file system.
guessExtension() : string|null
Returns the extension based on the mime type.
If the mime type is unknown, returns null.
This method uses the mime type as guessed by getMimeType() to guess the file extension.
The guessed extension or null if it cannot be guessed
getMimeType() : string|null
Returns the mime type of the file.
The mime type is guessed using a MimeTypeGuesser instance, which uses finfo(), mime_content_type() and the system binary "file" (in this order), depending on which of those are available.
The guessed mime type (e.g. "application/pdf")
move(string $directory, string $name = null) : self
Moves the file to a new location.
string | $directory | The destination folder |
string | $name | The new file name |
if the target file could not be created
A File object representing the new file