| 406 | |
| 407 | |
| 408 | std::string stem(const std::string& path) |
| 409 | { |
| 410 | std::string f = getFilename(path); |
| 411 | if (f != "." && f != "..") |
| 412 | { |
| 413 | std::string::size_type pos = f.find_last_of("."); |
| 414 | if (pos != std::string::npos) |
| 415 | f = f.substr(0, pos); |
| 416 | } |
| 417 | return f; |
| 418 | } |
| 419 | |
| 420 | |
| 421 | // Determine if the path represents a directory. |