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;
}