elFinderVolumeFTP::_mkfile PHP Method

_mkfile() protected method

Create file and return it's path or false on failed
Author: Dmitry (dio) Levashov
protected _mkfile ( string $path, string $name ) : string | boolean
$path string parent dir path
$name string new file name
return string | boolean
    protected function _mkfile($path, $name)
    {
        if ($this->tmp) {
            $path = $this->_joinPath($path, $name);
            $local = $this->getTempFile();
            $res = touch($local) && ftp_put($this->connect, $path, $local, FTP_ASCII);
            unlink($local);
            return $res ? $path : false;
        }
        return false;
    }