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 47 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(), and PathJoin(). 00048 { 00049 String a = StringReplace(path1, "\\", "/"); 00050 String b = StringReplace(path2, "\\", "/"); 00051 if(b[0] == '/') 00052 { 00053 return b; 00054 } 00055 if(a.empty()) 00056 { 00057 return b; 00058 } 00059 if(a[a.size()-1] == '/') 00060 { 00061 return a + b; 00062 } 00063 else 00064 { 00065 return a + "/" + b; 00066 } 00067 }
Here is the call graph for this function:
|