827
DataStatus DataPointGridFTP::do_more_stat(FileInfo& f) {
827
DataStatus DataPointGridFTP::do_more_stat(FileInfo& f, DataPointInfoType verb) {
828
828
DataStatus result = DataStatus::Success;
829
829
GlobusResult res;
830
830
globus_off_t size = 0;
831
831
globus_abstime_t gl_modify_time;
832
832
time_t modify_time;
833
833
std::string f_url = url.ConnectionURL() + f.GetName();
834
if ((!f.CheckSize()) && (f.GetType() != FileInfo::file_type_dir)) {
834
if (((verb & INFO_TYPE_CONTENT) == INFO_TYPE_CONTENT) && (!f.CheckSize()) && (f.GetType() != FileInfo::file_type_dir)) {
835
835
logger.msg(DEBUG, "list_files_ftp: looking for size of %s", f_url);
836
836
res = globus_ftp_client_size(&ftp_handle, f_url.c_str(), &ftp_opattr,
837
837
&size, &ftp_complete_callback, cbarg);
860
860
f.SetType(FileInfo::file_type_file);
863
if (!f.CheckCreated()) {
863
if ((verb & INFO_TYPE_TIMES) == INFO_TYPE_TIMES && !f.CheckCreated()) {
864
864
logger.msg(DEBUG, "list_files_ftp: "
865
865
"looking for modification time of %s", f_url);
866
866
res = globus_ftp_client_modification_time(&ftp_handle, f_url.c_str(),
891
891
f.SetCreated(modify_time);
894
if (!f.CheckCheckSum() && f.GetType() != FileInfo::file_type_dir) {
894
if ((verb & INFO_TYPE_CONTENT) == INFO_TYPE_CONTENT && !f.CheckCheckSum() && f.GetType() != FileInfo::file_type_dir) {
895
895
// not all implementations support checksum so failure is not an error
896
896
logger.msg(DEBUG, "list_files_ftp: "
897
897
"looking for checksum of %s", f_url);
973
973
file.SetName(lister_info.GetName());
974
974
file.SetMetaData("path", lister_info.GetName());
976
DataStatus r = do_more_stat(lister_info);
976
DataStatus r = do_more_stat(lister_info, verb);
977
977
if(!r) result = r;
979
979
file.SetType(lister_info.GetType());
1022
1022
files.insert(files.end(), FileInfo(i->GetLastName()));
1023
1023
f->SetMetaData("path", i->GetLastName());
1024
1024
if (more_info) {
1025
DataStatus r = do_more_stat(*i);
1025
DataStatus r = do_more_stat(*i, verb);
1027
1027
if(r == DataStatus::StatError) r = DataStatus(DataStatus::ListError, r.GetDesc());
1190
1190
logger.msg(VERBOSE, "globus_ftp_client_operationattr_set_authorization: error: %s", r.str());
1192
1192
if (force_secure || (url.Option("secure") == "yes")) {
1193
globus_ftp_client_operationattr_set_mode(&ftp_opattr,
1194
GLOBUS_FTP_CONTROL_MODE_EXTENDED_BLOCK);
1195
1193
globus_ftp_client_operationattr_set_data_protection(&ftp_opattr,
1196
1194
GLOBUS_FTP_CONTROL_PROTECTION_PRIVATE);
1197
1195
logger.msg(VERBOSE, "Using secure data transfer");
1201
globus_ftp_client_operationattr_set_mode(&ftp_opattr,
1202
GLOBUS_FTP_CONTROL_MODE_STREAM);
1204
globus_ftp_client_operationattr_set_mode(&ftp_opattr,
1205
GLOBUS_FTP_CONTROL_MODE_EXTENDED_BLOCK);
1206
1198
globus_ftp_client_operationattr_set_data_protection(&ftp_opattr,
1207
1199
GLOBUS_FTP_CONTROL_PROTECTION_CLEAR);
1208
1200
logger.msg(VERBOSE, "Using insecure data transfer");
1202
if (force_passive) {
1203
globus_ftp_client_operationattr_set_mode(&ftp_opattr,
1204
GLOBUS_FTP_CONTROL_MODE_STREAM);
1206
globus_ftp_client_operationattr_set_mode(&ftp_opattr,
1207
GLOBUS_FTP_CONTROL_MODE_EXTENDED_BLOCK);
1210
1209
globus_ftp_client_operationattr_set_control_protection(&ftp_opattr,
1211
1210
GLOBUS_FTP_CONTROL_PROTECTION_PRIVATE);