Get root directory.
Declared in <llvm/Support/Path.h>
StringRef
root_directory(
StringRef path,
Style style = Style::native);
/goo/hello => /
c:/hello => /
d/file.txt => <empty>
The root directory of path if it has one, otherwise "".
| Name | Description |
|---|---|
| path | Input path. |
| style | The style of path (e.g. Windows or POSIX). "native" style means to derive the style from the host. |