os.Path.rootDir

Returns the root directory of the current working path.

Syntax

os.Path.rootDir()
  RETURNS STRING

Usage

This function returns the root directory of the current working path.

On UNIX™, it always returns "/".

On Windows™ it returns the current working drive as "[a-zA-Z]:\"