| Qore FsUtil Module Reference 1.1

Public Member Functions | List of all members
FsUtil::WinPathHandler Class Reference

path handler implementing Windows specific functionality More...

Inheritance diagram for FsUtil::WinPathHandler:
[legend]

## Public Member Functions
| constructor ()
| creates the object and sets the delimiter
string | joinPaths (string path1, softlist< string > paths)
| Returns path resulting from joining the given paths. More...
list< string > | splitDrive (string path)
| separates and returns the drive and the rest of the path More...

## Additional Inherited Members
Public Attributes inherited from FsUtil::PathHandler
list< string > | delimiters
| path delimiters - to be set by platform specific path handlers

## Detailed Description

path handler implementing Windows specific functionality

## Member Function Documentation

## ◆ joinPaths()

string FsUtil::WinPathHandler::joinPaths | ( | string | path1,
|  | softlist< string > | paths
| ) |  |
| virtual

Returns path resulting from joining the given paths.

Parameters

  path1 | the first part of the path
  paths | the other parts of the path

Returns
  all paths joined into one valid path (i.e. delimiters are added/removed as needed) except for cases when one of the paths (in the list) is an absolute path or if each path is on different drive - in such cases that path is considered a new start of the resulting path. The resulting path is not normalized (i.e. "/path/to/../../file.txt" is a correct result of join("/path/to", "../../file.txt");). Since the second parameter is a softlist, this variant also works for joining two string paths.

Implements FsUtil::PathHandler.

## ◆ splitDrive()

list<string> FsUtil::WinPathHandler::splitDrive | ( | string | path | ) |

separates and returns the drive and the rest of the path

Parameters

  path | the path to be processed

Returns
  list<string> of two items - drive and the rest of the path, either can be empty and concatenation of both parts always gives the original path back.