public function setDirectory($path) {
        if (substr($path, -1) !== '/') {
            $path .= '/';
        }

        if (!file_exists($path)) {
            mkdir($path, 0777, true);

        } else if (!is_writable($path)) {
            chmod($path, 0777);
        }

        $this->_directory = $path;

        return $this;
    }
public function setDirectory($path) {
        if (substr($path, -1) !== '/') {
            $path .= '/';
        }

        if (!file_exists($path)) {
            mkdir($path, 0777, true);

        } else if (!is_writable($path)) {
            chmod($path, 0777);
        }

        $this->_directory = $path;

        return $this;
    }
public function setDirectory ( $ path ) { if ( substr ( $ path , - 1 ) !== '/' ) { $ path .= '/' ; } if ( ! file_exists ( $ path ) ) { mkdir ( $ path , 0777 , true ) ; } else if ( ! is_writable ( $ path ) ) { chmod ( $ path , 0777 ) ; } $ this -> _directory = $ path ; return $ this ; }
Set the temporary directory and create it if it does not exist.

@param string $path
@return \Transit\Transit
Set the temporary directory and create it if it does not exist .