public function setLocation(string $location)
    {
        $dir = Directory::make($location, Directory::MAKE_DIRECTORY_EXISTS_OPEN);

        $old = $this->getPath();
        $new = $dir->getPath();

        if(rename($old, $new)) {
            $this->_location = $dir->getPath();
        }
    }
public function setLocation(string $location)
    {
        $dir = Directory::make($location, Directory::MAKE_DIRECTORY_EXISTS_OPEN);

        $old = $this->getPath();
        $new = $dir->getPath();

        if(rename($old, $new)) {
            $this->_location = $dir->getPath();
        }
    }
public function setLocation ( string $ location ) { $ dir = Directory :: make ( $ location , Directory :: MAKE_DIRECTORY_EXISTS_OPEN ) ; $ old = $ this -> getPath ( ) ; $ new = $ dir -> getPath ( ) ; if ( rename ( $ old , $ new ) ) { $ this -> _location = $ dir -> getPath ( ) ; } }
Moves the file to the specified location.

@param string $location New file location.
Moves the file to the specified location .