Joins two paths together (inspired by Python os.path.join). Most important use of this function is the insertion of a /, if needed. It works on ordinary file paths only. The function does no normalization (e.g. removing ..), the Python version would. Definition at line 62 of file FileNameTmp.h. References StringReplace(). Referenced by FileNameTmp(), Impala::Core::Database::RawDataSet::GetFilePathFeatureData(), Impala::Core::Database::RawDataSet::GetFilePathKernelData(), Impala::Core::Database::RawDataSet::GetFilePathSimilarityData(), Impala::Core::ImageSet::InterestPointProc::HandleDoneDir(), Impala::Core::VideoSet::InterestPointProc::HandleDoneFile(), Impala::Core::ImageSet::InterestPointProc::HandleNewFile(), Impala::Core::VideoSet::InterestPointProc::HandleNewFrame(), PathJoin(), and Impala::Core::Feature::InterestPointFeature::ProjectOntoCodebook(). 00063 { 00064 String a = StringReplace(path1, "\\", "/"); 00065 String b = StringReplace(path2, "\\", "/"); 00066 if(b[0] == '/') 00067 { 00068 return b; 00069 } 00070 if(a.empty()) 00071 { 00072 return b; 00073 } 00074 if(a[a.size()-1] == '/') 00075 { 00076 return a + b; 00077 } 00078 else 00079 { 00080 return a + "/" + b; 00081 } 00082 }
Here is the call graph for this function: ![]()
|