! returns the basename */
| 49 | |
| 50 | /*! returns the basename */ |
| 51 | std::string FileName::base() const { |
| 52 | size_t pos = filename.find_last_of(path_sep); |
| 53 | if (pos == std::string::npos) return filename; |
| 54 | return filename.substr(pos+1); |
| 55 | } |
| 56 | |
| 57 | /*! returns the extension */ |
| 58 | std::string FileName::ext() const { |