add FileName::extension() method.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26494 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-09-22 09:44:44 +00:00
parent 8c4ffb42da
commit c0aeb567ce
2 changed files with 10 additions and 2 deletions

View File

@ -302,6 +302,12 @@ string FileName::onlyFileNameWithoutExt() const
}
string FileName::extension() const
{
return fromqstr(d->fi.suffix());
}
FileName FileName::onlyPath() const
{
FileName path;

View File

@ -172,6 +172,8 @@ public:
std::string onlyFileName() const;
/// filename without path and without extension
std::string onlyFileNameWithoutExt() const;
/// only extension after the last dot.
std::string extension() const;
/// path without file name
FileName onlyPath() const;
/// used for display in the Gui