public function getRelativePath()
{
$current_path = getcwd();
if ($current_path === "/") {
return $this->_realpath;
} else {
if (substr($this->_realpath, 0, strlen($current_path)) === $current_path) {
return substr($this->_realpath, strlen($current_path));
} else {
throw new CFileException('Unable to resolve relative path for filesystem object.');
}
}
}