The extension of a filename : returns "ext" given "/dir1/dir2/base.ext".
Definition at line 43 of file FileName.h.
References FileNameLastPathSepPos().
Referenced by Impala::Core::VideoSet::ConcatFeatures::ConcatFeatures(), Impala::Core::ImageSet::ConcatFeatures::ConcatFeatures(), Impala::Core::Geometry::DatabaseReadVxRectangle(), Impala::Application::Table::DoDumpQuidTable(), Impala::Application::Table::DoProcSimilarityTableSet(), Impala::Core::Geometry::FileReadVxRectangle(), Impala::Persistency::FeatureTableSetRepository::Get(), Impala::Persistency::ImageRepositoryInFile::GetDir(), Impala::Core::ImageSet::Thumbnails::HandleNewFile(), Impala::Core::VideoSet::ExportKeyframes::HandleNewFrame(), Impala::Application::mainImSet(), Impala::Application::mainShow(), Impala::Application::VidSet::mainVidSet(), Impala::Core::ImageSet::MakeImageSet(), Impala::Core::ImageSet::MakeIxsDocument(), Impala::Core::VideoSet::MakeVideoSet(), Impala::Core::VideoSet::MakeVxsDocument(), Impala::Visualization::DirImViewer3D::OpenDir(), Impala::Visualization::DirImViewer::OpenDir(), Impala::Application::VideoExcel::TableDataSourceImageDir::OpenDir(), Impala::Application::MediaTable::TableDataSourceImageDir::OpenDir(), Impala::Core::VideoJob::Manager::Prepare(), Impala::Core::Array::ReadFile(), Impala::Core::Stream::RgbDataSrcFactory::SuggestSrc(), Impala::Application::WindowShow< ArrayT >::WindowShow(), and Impala::Core::Array::WriteFile().
00044 {
00045 const String::size_type dotPos = filePath.rfind('.');
00046 if (dotPos == String::npos || dotPos + 1 == filePath.size())
00047 return String("");
00048
00049 const String::size_type sepPos = FileNameLastPathSepPos(filePath);
00050 if (sepPos != String::npos && sepPos > dotPos)
00051 return String("");
00052
00053 String ext = filePath.substr(dotPos + 1);
00054 if (doLowerCase)
00055 for (String::size_type i = 0 ; i < ext.size() ; i++)
00056 ext[i] = tolower(ext[i]);
00057 return ext;
00058 }
Here is the call graph for this function: