# FS_CreateFile

## Syntax

    #include <nitro/fs.h>

    BOOL FS_CreateFile(const char *path, u32 permit);

## Arguments

path | Path name of the file to be created.
permit | Specifies the combination of `FS_PERMIT_*` flags that indicate the access rights to the file.

## Return Values

Returns TRUE if the file was created properly; returns FALSE otherwise. In case of failure, the error details can be obtained using `FS_GetArchiveResultCode()`.

## Description

Creates the new file specified by the arguments. The function returns FALSE in the following situations:

- If the target archive does not support the creation of new files.
- If a file of the same name already exists.

## Note

- This function cannot be called from the interrupt handler (IRQ mode). Also note that in some cases processing may not end if interrupts are left prohibited.

## See Also

`FS_PERMIT_*
FS_DeleteFile FS_RenameFile FS_GetResultCode`

## Revision History

2007/09/18 Initial version.

CONFIDENTIAL