os.Path.isRoot

Checks if a file path is a root path.

Syntax

os.Path.isRoot(
   path STRING)
  RETURNING result BOOLEAN
x
  1. path is the path to check.

Usage

The function returns TRUE if the path is a root path, FALSE otherwise.

On UNIX™ the root path is '/'.

On Windows™ the root path matches "[a-zA-Z]:\".