Nuklear+
 All Classes Files Functions Enumerations Enumerator Macros Groups Pages
Functions
File functions

Not really related to GUI, but useful in most programs. More...

Functions

int nkc_file_exists (const char *filename)
 
size_t nkc_file_size (const char *filename)
 
size_t nkc_stdfile_size (FILE *f)
 Returns file size in bytes. More...
 
void nkc_mount_write (const char *folder)
 Mounts local storage folder for writing. Useful for Emscripten only. More...
 
void nkc_file_pre_read ()
 
void nkc_file_post_write ()
 

Detailed Description

Not really related to GUI, but useful in most programs.

Function Documentation

int nkc_file_exists ( const char *  filename)

Checks if file exists on disk. nk_true if so.

void nkc_file_post_write ( )

Writes memory contents to local storage. Usually call it after all fclose

void nkc_file_pre_read ( )

Reads local storage to memory. Usually call it one time only, after mount. Useful for Emscripten only.

size_t nkc_file_size ( const char *  filename)

Returns file size in bytes.

void nkc_mount_write ( const char *  folder)

Mounts local storage folder for writing. Useful for Emscripten only.

Parameters
folder- path to the folder. "/save" for example
size_t nkc_stdfile_size ( FILE *  f)

Returns file size in bytes.

Parameters
f- pointer to std FILE
Returns
File size in bytes