Header File Index

| File type checking

### tifiles_fext_of_group

TIEXPORT2 const char * TICALL tifiles_fext_of_group (CalcModel model)

Returns file extension of a group file.

model : | a calculator model.
Return value : | a file extension as string (like "83g").

### tifiles_fext_of_backup

TIEXPORT2 const char * TICALL tifiles_fext_of_backup (CalcModel model)

Returns file extension of a backup file.

model : | a calculator model.
Return value : | a file extension as string (like "83b").

### tifiles_fext_of_flash_app

TIEXPORT2 const char * TICALL tifiles_fext_of_flash_app (CalcModel model)

Returns file extension of a FLASH application file.

model : | a calculator model.
Return value : | a file extension as string (like "89k").

### tifiles_fext_of_flash_os

TIEXPORT2 const char * TICALL tifiles_fext_of_flash_os(CalcModel model)

Returns file extension of a FLASH Operating System file.

model : | a calculator model.
Return value : | a file extension as string (like "89u").

### tifiles_fext_of_certif

TIEXPORT2 const char * TICALL tifiles_fext_of_certif(CalcModel model)

Returns file extension of certificate file.

model : | a calculator model.
Return value : | a file extension as string (like "89q").

### tifiles_fext_get

TIEXPORT2 char * TICALL tifiles_fext_get(const char *filename)

Returns file extension part.

filename : | a filename as string.
Return value : | a file extension without dot as string (like "89g").

### tifiles_fext_dup

TIEXPORT2 char * TICALL tifiles_fext_dup(const char *filename)

Returns a copy of file extension part.

filename : | a filename as string.
Return value : | a file extension without dot as string (like "89g"). Needs to be freed with tifiles_fext_free() when no longer needed.

### tifiles_fext_free

g_free(filename);

Frees a file extension part previously allocated with tifiles_fext_dup(). /

filename : | a filename as string.
Return value : |

### tifiles_file_has_ti_header

TIEXPORT2 int TICALL tifiles_file_has_ti_header(const char *filename)

Check whether file has a TI magic number in the header.

filename : | a filename as string.
Return value : | a boolean value.

### tifiles_file_has_tib_header

TIEXPORT2 int TICALL tifiles_file_has_tib_header(const char *filename)

Check whether file has a TIB magic number in the header.

filename : | a filename as string.
Return value : | a boolean value.

### tifiles_file_has_tig_header

TIEXPORT2 int TICALL tifiles_file_has_tig_header(const char *filename)

Check whether file has a ZIP file header.

filename : | a filename as string.
Return value : | a boolean value.

### tifiles_file_has_tifl_header

TIEXPORT2 int TICALL tifiles_file_has_tifl_header(const char *filename, uint8_t *dev_type, uint8_t *data_type)

Check whether file has a TI Flash file magic number in the header, and fill device type and data type for the last entry in the file.

filename : | a filename as string.
Return value : | a boolean value.

### tifiles_file_has_tno_header

TIEXPORT2 int TICALL tifiles_file_has_tno_header(const char *filename)

Check whether file has a Nspire OS / OS extension file header.

filename : | a filename as string.
Return value : | a boolean value.

### tifiles_model_to_dev_type

TIEXPORT2 int TICALL tifiles_model_to_dev_type(CalcModel model)

Converts the calculator model to FlashApp DeviceType.

model : | a calculator model
Return value : | FlashApp DeviceType if that calculator model supports FlashApps, -1 otherwise.

### tifiles_file_is_ti

TIEXPORT2 int TICALL tifiles_file_is_ti(const char *filename)

Check whether file is a TI file by checking the signature.

filename : | a filename as string.
Return value : | a boolean value.

### tifiles_file_is_single

TIEXPORT2 int TICALL tifiles_file_is_single(const char *filename)

Check whether file is a single TI file (like program, function, ...).

filename : | a filename as string.
Return value : | a boolean value.

### tifiles_file_is_group

TIEXPORT2 int TICALL tifiles_file_is_group(const char *filename)

Check whether file is a group file.

filename : | a filename as string.
Return value : | a boolean value.

### tifiles_file_is_regular

TIEXPORT2 int TICALL tifiles_file_is_regular(const char *filename)

Check whether file is a single or group file.

filename : | a filename as string.
Return value : | a boolean value.

### tifiles_file_is_backup

TIEXPORT2 int TICALL tifiles_file_is_backup(const char *filename)

Check whether file is a backup file.

filename : | a filename as string.
Return value : | a boolean value.

### tifiles_file_is_os

TIEXPORT2 int TICALL tifiles_file_is_os(const char *filename)

Check whether file is a FLASH OS file (tib or XXu)

filename : | a filename as string.
Return value : | a boolean value.

### tifiles_file_is_app

TIEXPORT2 int TICALL tifiles_file_is_app(const char *filename)

Check whether file is a FLASH app file

filename : | a filename as string.
Return value : | a boolean value.

### tifiles_file_is_flash

TIEXPORT2 int TICALL tifiles_file_is_flash(const char *filename)

Check whether file is a FLASH file (os or app).

filename : | a filename as string.
Return value : | a boolean value.

### tifiles_file_is_tib

TIEXPORT2 int TICALL tifiles_file_is_tib(const char *filename)

Check whether file is a TIB formatted file.

filename : | a filename as string.
Return value : | a boolean value.

### tifiles_file_is_tigroup

TIEXPORT2 int TICALL tifiles_file_is_tigroup(const char *filename)

Check whether file is a TiGroup formatted file.

filename : | a filename as string.
Return value : | a boolean value.

### tifiles_file_is_tno

TIEXPORT2 int TICALL tifiles_file_is_tno(const char *filename)

Check whether file is a TNO formatted file.

filename : | a filename as string.
Return value : | a boolean value.

### tifiles_file_test

TIEXPORT2 int TICALL tifiles_file_test(const char *filename, FileClass type, CalcModel target)

Check whether #filename is a TI file of type #type useable on a #target model. This function is a generic one which overwrap and extends the tifiles_file_is_* functions.

filename : | a filename as string.
type : | type to check
target : | hand-held model or CALC_NONE for no filtering
Return value : | a boolean value.

### tifiles_fext_to_model

TIEXPORT2 CalcModel TICALL tifiles_fext_to_model(const char *ext)

Returns the calculator model corresponding best to this file extension.

filename : | a file extension.
Return value : | a model taken in #CalcModel.

### tifiles_file_get_model

TIEXPORT2 CalcModel TICALL tifiles_file_get_model(const char *filename)

Returns the calculator model targeted by this file.

filename : | a filename as string.
Return value : | a model taken in #CalcModel.

### tifiles_file_get_class

TIEXPORT2 FileClass TICALL tifiles_file_get_class(const char *filename)

Returns the file class (single, group, backup, flash, tigroup).

filename : | a filename as string.
Return value : | a value in #FileClass.

### tifiles_file_get_type

TIEXPORT2 const char *TICALL tifiles_file_get_type(const char *filename)

Returns the type of file (function, program, ...).

filename : | a filename as string.
Return value : | a string like "Assembly Program" (localized).

### tifiles_file_get_icon

TIEXPORT2 const char *TICALL tifiles_file_get_icon(const char *filename)

Returns the type of file (function, program, ...).

filename : | a filename as string.
Return value : | a string like "Assembly Program" (non localized).

### Return to the main index