lib/File.php
public function getName($os = null)
    {
        if ($os === null) {
            if (strstr(strtoupper(php_uname()), "WIN")) $os = self::OS_WINDOWS;
            elseif (strstr(strtoupper(php_uname()), "MACOS")) $os = self::OS_MAC;
            else $os = self::OS_UNIX;
        }
        $host = $this->getHost();

        $filename = $this->getPath();
        if ($filename{0} === '/' && $os == self::OS_WINDOWS) {
            $filename = substr($filename, 1);
        }
        if ($os == self::OS_WINDOWS) {
            $filename = str_replace('/', '\\', $filename);
        }

        if ($os == self::OS_WINDOWS) {
            if ($host && $host !== 'localhost') return sprintf('\\\\%s\%s', $host, $filename);
            else return $filename;
        } else {
            return $this->buildStr();
        }
    }
public function getName($os = null)
    {
        if ($os === null) {
            if (strstr(strtoupper(php_uname()), "WIN")) $os = self::OS_WINDOWS;
            elseif (strstr(strtoupper(php_uname()), "MACOS")) $os = self::OS_MAC;
            else $os = self::OS_UNIX;
        }
        $host = $this->getHost();

        $filename = $this->getPath();
        if ($filename{0} === '/' && $os == self::OS_WINDOWS) {
            $filename = substr($filename, 1);
        }
        if ($os == self::OS_WINDOWS) {
            $filename = str_replace('/', '\\', $filename);
        }

        if ($os == self::OS_WINDOWS) {
            if ($host && $host !== 'localhost') return sprintf('\\\\%s\%s', $host, $filename);
            else return $filename;
        } else {
            return $this->buildStr();
        }
    }
public function getName ( $ os = null ) { if ( $ os === null ) { if ( strstr ( strtoupper ( php_uname ( ) ) , "WIN" ) ) $ os = self :: OS_WINDOWS ; elseif ( strstr ( strtoupper ( php_uname ( ) ) , "MACOS" ) ) $ os = self :: OS_MAC ; else $ os = self :: OS_UNIX ; } $ host = $ this -> getHost ( ) ; $ filename = $ this -> getPath ( ) ; if ( $ filename { 0 } === '/' && $ os == self :: OS_WINDOWS ) { $ filename = substr ( $ filename , 1 ) ; } if ( $ os == self :: OS_WINDOWS ) { $ filename = str_replace ( '/' , '\\' , $ filename ) ; } if ( $ os == self :: OS_WINDOWS ) { if ( $ host && $ host !== 'localhost' ) return sprintf ( '\\\\%s\%s' , $ host , $ filename ) ; else return $ filename ; } else { return $ this -> buildStr ( ) ; } }
Get legacy file string name

@return string
Get legacy file string name