NukeViet\Ftp\Ftp::DetectedMode PHP Method

DetectedMode() protected method

protected DetectedMode ( mixed $fileName )
$fileName mixed
    protected function DetectedMode($fileName)
    {
        if ($this->config['type'] == FTP_AUTOASCII) {
            $dot = strrpos($fileName, '.') + 1;
            $ext = substr($fileName, $dot);
            if (in_array($ext, $this->AutoAscii)) {
                $mode = FTP_ASCII;
            } else {
                $mode = FTP_BINARY;
            }
        } elseif ($this->config['type'] == FTP_ASCII) {
            $mode = FTP_ASCII;
        } else {
            $mode = FTP_BINARY;
        }
        return $mode;
    }