private function _createFile($dir, $name, $ext)
    {
        if (!empty($this->rootDir)) {
            if (!file_exists($this->_getFileDir($dir))) {
                mkdir($this->_getFileDir($dir), 0777, true);
            }
            if (!file_exists($this->_getFilePath($dir, $name, $ext))) {
                if (file_put_contents($this->_getFilePath($dir, $name, $ext), '') === false) {
                    throw new \Exception("Could not create $ext for {$this->username}.");
                }
            }
        }
    }
private function _createFile($dir, $name, $ext)
    {
        if (!empty($this->rootDir)) {
            if (!file_exists($this->_getFileDir($dir))) {
                mkdir($this->_getFileDir($dir), 0777, true);
            }
            if (!file_exists($this->_getFilePath($dir, $name, $ext))) {
                if (file_put_contents($this->_getFilePath($dir, $name, $ext), '') === false) {
                    throw new \Exception("Could not create $ext for {$this->username}.");
                }
            }
        }
    }
private function _createFile ( $ dir , $ name , $ ext ) { if ( ! empty ( $ this -> rootDir ) ) { if ( ! file_exists ( $ this -> _getFileDir ( $ dir ) ) ) { mkdir ( $ this -> _getFileDir ( $ dir ) , 0777 , true ) ; } if ( ! file_exists ( $ this -> _getFilePath ( $ dir , $ name , $ ext ) ) ) { if ( file_put_contents ( $ this -> _getFilePath ( $ dir , $ name , $ ext ) , '' ) === false ) { throw new \ Exception ( "Could not create $ext for {$this->username}." ) ; } } } }
The directory and file are created automatically.
@param $dir
@param $name
@param $ext
@throws \Exception
The directory and file are created automatically .