src/Mime/MimeDetector.php
public function setFile(string $filePath): self
    {
        if (!file_exists($filePath)) {
            throw new MimeDetectorException("File '" . $filePath . "' does not exist.");
        }

        $this->stream = $this->readFile($filePath);
        $this->createByteCache();
        return $this;
    }
public function setFile(string $filePath): self
    {
        if (!file_exists($filePath)) {
            throw new MimeDetectorException("File '" . $filePath . "' does not exist.");
        }

        $this->stream = $this->readFile($filePath);
        $this->createByteCache();
        return $this;
    }
public function setFile ( string $ filePath ) : self { if ( ! file_exists ( $ filePath ) ) { throw new MimeDetectorException ( "File '" . $ filePath . "' does not exist." ) ; } $ this -> stream = $ this -> readFile ( $ filePath ) ; $ this -> createByteCache ( ) ; return $ this ; }
Setter for the file to be checked.

@param   string $filePath
@return  MimeDetector
@throws  MimeDetectorException
Setter for the file to be checked .