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

PStringArray PDirectory::GetPath (  ) const

Get the directory path as an array of strings. The first element in the array is the volume string, eg under Win32 it is "c:" or "\\machine", while under unix it is an empty string.

Definition at line 585 of file ptlib.cxx.

References PString::IsEmpty(), PString::Mid(), and PString::Tokenise().

Referenced by PURL::PURL().

  PStringArray path;

  if (IsEmpty())
    return path;

  if ((*this)[1] == ':')
    path = Tokenise("/\\", FALSE);
  else {
    path = Mid(2).Tokenise("/\\", FALSE);
    path[0].Splice("\\\\", 0);

  PINDEX last = path.GetSize()-1;
  while (path[last].IsEmpty())

  return path;

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index