Capsule::resolvePath PHP Method

resolvePath() protected method

This returns a "best guess" path for the given file.
protected resolvePath ( string $file, string $basepath ) : string
$file string File name or possibly absolute path.
$basepath string The basepath that should be prepended if $file is not absolute.
return string "Best guess" path for this file.
    protected function resolvePath($file, $basepath)
    {
        if (!($file[0] == DIRECTORY_SEPARATOR || $file[0] == '/') && !($file[1] == ':' && ($file[2] == DIRECTORY_SEPARATOR || $file[2] == '/'))) {
            if ($basepath != null) {
                $file = $basepath . DIRECTORY_SEPARATOR . $file;
            }
        }
        return $file;
    }