void dir_cpi_impl::sync_is_link (bool & is_link) { adaptor_data_t AdaptorData(this); directory_instance_data_t InstanceData (this); GridFTPConnection * ConnectionHandle = AdaptorData->getConnectionHandleForURL(InstanceData->location_); bool test = false; try { test = ConnectionHandle->is_symlink(InstanceData->location_.get_url()); } catch( curl_file_adaptor::exception const &e) { error_package ep = curl_file_adaptor ::error_default_redirect(e, InstanceData->location_.get_url()); SAGA_OSSTREAM strm; strm << "Could not check if [" << InstanceData->location_ << "] is a (sym-)link." << ep.error_text; SAGA_ADAPTOR_THROW(SAGA_OSSTREAM_GETSTRING(strm), ep.saga_error); } is_link = test; }
void dir_cpi_impl::sync_is_link (bool & is_link, saga::url url) { adaptor_data_t AdaptorData(this); directory_instance_data_t InstanceData(this); this->throw_if_local(InstanceData->location_); this->check_if_open ("dir_cpi_impl::sync_is_link", InstanceData->location_); saga::url u = merge_urls(InstanceData->location_.get_url(), url); try { GridFTPConnection * ConnectionHandle = AdaptorData->getConnectionHandleForURL(u, write_log_, logfile_loc_); is_link = ConnectionHandle->is_symlink(u.get_url()); } catch( globus_gridftp_file_adaptor::exception const &e) { error_package ep = globus_gridftp_file_adaptor ::error_default_redirect(e, InstanceData->location_.get_url()); SAGA_OSSTREAM strm; strm << "Could not check if [" << u.get_url() << "] is a (sym-)link. " << ep.error_text; SAGA_ADAPTOR_THROW(SAGA_OSSTREAM_GETSTRING(strm), ep.saga_error); } }