toPath

Converts the receiver Path or String into a path, if it wasn't one already.

Throws

if the receiver is neither a Path nor a String.