This function will create a new file or directory in the file system.
Any nodes that have not been created or resolved, will be. If the file
or directory already exists create() will return
NS_ERROR_FILE_ALREADY_EXISTS.

Arguments:

type: This specifies the type of file system object to be made. The
only two types at this time are file and directory/folder which are:

NORMAL_FILE_TYPE = 0x00
DIRECTORY_TYPE = 0x01

If the type is unrecongnized, we will return an error
(NS_ERROR_FILE_UNKNOWN_TYPE).

permissions: The unix style octal permissions. This may be ignored on
systems that do not need to do permissions. In general, permissions are
based on three octal numbers. The first specifies the access for the
user, the second for the group and the last for others.

2. The file status IO flag. It is a bitwise OR of the following
bit flags (only one of the first three flags below may be used):

0x01 – Open for reading only.
0x02 – Open for writing only.
0x04 – Open for reading and writing.
0x08 – If the file does not exist, the file is created.
If the file exists, this flag has no effect.
0x10 – If set, each write will wait for both the file
data and file status to be physically updated.
0x20 – The file pointer is set to the end of the file
prior to each write.
0x40 – If the file exists, its length is truncated to 0.
0x80 – If the file does not exist, the file is created.

If the file already exists, no action and NULL is returned.

3. The access permission bits of the file ‘mode’.
CAVEAT: ‘mode’ is currently only applicable on UNIX platforms.
The ‘mode’ argument may be ignored on other platforms.