/[svn]/linuxsampler/trunk/src/common/Path.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/common/Path.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2011 by persson, Tue Jul 14 18:25:11 2009 UTC revision 2012 by iliev, Fri Oct 23 17:53:17 2009 UTC
# Line 261  std::string Path::getName() { Line 261  std::string Path::getName() {
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
# Line 278  std::string Path::getBaseName() { Line 278  std::string Path::getBaseName() {
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

Legend:
Removed from v.2011  
changed lines
  Added in v.2012

  ViewVC Help
Powered by ViewVC