protected function resolve_file_path($file = null)
    {
        if (is_null($file)) {
            $file = $this->args->file;
        }

        if (file_exists($file)) {
            return $file;
        }

        $dirname  = dirname($file);
        $filename = basename($file);
        $relpath  = $dirname ? "/$dirname" : '';
        $path     = getcwd() . "$relpath/$filename";

        /**
         * realpath will return false if path does not exist
         */
        return realpath($path) ?: str_replace('/./', '/', $path);
    }
protected function resolve_file_path($file = null)
    {
        if (is_null($file)) {
            $file = $this->args->file;
        }

        if (file_exists($file)) {
            return $file;
        }

        $dirname  = dirname($file);
        $filename = basename($file);
        $relpath  = $dirname ? "/$dirname" : '';
        $path     = getcwd() . "$relpath/$filename";

        /**
         * realpath will return false if path does not exist
         */
        return realpath($path) ?: str_replace('/./', '/', $path);
    }
protected function resolve_file_path ( $ file = null ) { if ( is_null ( $ file ) ) { $ file = $ this -> args -> file ; } if ( file_exists ( $ file ) ) { return $ file ; } $ dirname = dirname ( $ file ) ; $ filename = basename ( $ file ) ; $ relpath = $ dirname ? "/$dirname" : '' ; $ path = getcwd ( ) . "$relpath/$filename" ; /**
         * realpath will return false if path does not exist
         */ return realpath ( $ path ) ? : str_replace ( '/./' , '/' , $ path ) ; }
Get the absolute path to the file.

@param null $file  The path to resolve, defaults to argument passed value.

@return string
Get the absolute path to the file .