Пример #1
0
void logical_directory_cpi_impl::sync_get_cwd(saga::url& cwd)
{
//    SAGA_ADAPTOR_THROW ("Not implemented! sync_get_cwd", saga::NotImplemented);
	SAGA_LOG_DEBUG("sync_get_cwd()");
	check_state();

	if (path.empty()) {
	  SAGA_ADAPTOR_THROW ("path is empty.", saga::NoSuccess);
	}

	adaptor_data_t  adaptorData(this);
	instance_data   instanceData (this);

	cwd = instanceData->location_;
	cwd.set_path(path.branch_path().string()); // remove last element.
}
Пример #2
0
 inline void remove_drive(saga::url& u)
 {
   std::string p(u.get_path());
   if (p.size() >= 2 && std::isalpha(p[0]) && p[1] == ':')
     u.set_path(p.substr(2));
 }