File type checking

tifiles_fext_of_group

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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