Logo Search packages:      
Sourcecode: ardour version File versions  Download package

std::string Glib::path_skip_root ( const std::string &  filename  ) 

Returns the remaining part of filename after the root component, i.e. after the "/" on UNIX or "C:\\" on Windows. If filename is not an absolute path, "" will be returned.

Parameters:
filename A file name.
Returns:
The file name without the root component, or "".

Definition at line 122 of file miscutils.cc.

{
  // g_path_skip_root() returns a pointer _into_ the argument string,
  // or NULL if there was no root component.

  if(const char *const ptr = g_path_skip_root(filename.c_str()))
    return std::string(ptr);
  else
    return std::string();
}


Generated by  Doxygen 1.6.0   Back to index