261 |
} |
} |
262 |
|
|
263 |
std::string Path::getBaseName(std::string path) { |
std::string Path::getBaseName(std::string path) { |
264 |
Path p; |
Path p; |
265 |
#if WIN32 |
#if WIN32 |
266 |
p = fromWindows(path); |
p = fromWindows(path); |
267 |
#else |
#else |
278 |
return name.substr(0, lastdot); |
return name.substr(0, lastdot); |
279 |
} |
} |
280 |
|
|
281 |
|
std::string Path::stripLastName() { |
282 |
|
if (elements.size() > 0) elements.pop_back(); |
283 |
|
#if WIN32 |
284 |
|
return toWindows(); |
285 |
|
#endif |
286 |
|
|
287 |
|
return toPosix(); |
288 |
|
} |
289 |
|
|
290 |
|
std::string Path::stripLastName(std::string path) { |
291 |
|
Path p; |
292 |
|
#if WIN32 |
293 |
|
p = fromWindows(path); |
294 |
|
#else |
295 |
|
p = fromPosix(path); |
296 |
|
#endif |
297 |
|
|
298 |
|
return p.stripLastName(); |
299 |
|
} |
300 |
|
|
301 |
} // namespace LinuxSampler |
} // namespace LinuxSampler |