NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
unsigned int CreateFile ( string  fname,
unsigned int  fsize,
byte &  handle 

Create a file.

Create a new file with the specified filename and size and open it for writing. The file handle is returned in the last parameter, which must be a variable. The loader result code is returned as the value of the function call. The filename and size parameters must be constants, constant expressions, or variables. A file created with a size of zero bytes cannot be written to since the NXC file writing functions do not grow the file if its capacity is exceeded during a write attempt.

fnameThe name of the file to create.
fsizeThe size of the file.
handleThe file handle output from the function call.
The function call result. See Loader module error codes.
ex_CreateFile.nxc, and ex_file_system.nxc.