Creates a new file or directory denoted by the path using the specified type. Parent directories will be created if they don't exist.
The path of the new file or directory.
The type (file or directory) to create.
or its inheritor if the path already exists, or path is invalid (e.g., contains reserved characters), or if any other I/O error occurs.