public function setPath(string $path)
    {
        $info = pathinfo($path);

        $this->setLocation($info["dirname"] ?? "");
        $this->setName($info["filename"] ?? "");
    }
public function setPath(string $path)
    {
        $info = pathinfo($path);

        $this->setLocation($info["dirname"] ?? "");
        $this->setName($info["filename"] ?? "");
    }
public function setPath ( string $ path ) { $ info = pathinfo ( $ path ) ; $ this -> setLocation ( $ info [ "dirname" ] ?? "" ) ; $ this -> setName ( $ info [ "filename" ] ?? "" ) ; }
Sets new file location, name and extension.

@param string $path New path to file (location + name + extension).
Sets new file location name and extension .