class documentation

class TIFlashFile(TIFile): (source)

Constructor: TIFlashFile(name, data)

View In Hierarchy

Undocumented

Method __init__ Creates an empty flash file with a specified name
Method add_header Adds a header to this file
Method bytes No summary
Method clear Removes all headers from this flash file
Method get_extension Determines the file extension for a targeted model based on its contents
Method load_bytes Loads a byte string or bytestream into this file
Method summary No summary
Class Variable magics Undocumented
Instance Variable headers Undocumented
Property is_empty Whether this flash file contains no headers

Inherited from TIFile:

Class Method get_type Gets the subclass corresponding to file magic if one is registered
Class Method open Creates a new file given a filename
Class Method register Registers a subtype with this class for coercion
Method __bool__ No summary
Method __bytes__ No summary
Method __copy__ No summary
Method __eq__ Determines if two files are identical
Method __format__ Undocumented
Method __len__ No summary
Method get_filename Determines the filename based on the instance name and targeted model
Method load_file Loads this file from a file pointer
Method save Saves this file given a filename
Method supported_by Determines whether this file supports a given model
Method targets Determines whether this file targets a given model
Instance Variable name Undocumented
Property checksum The checksum for the file
Method __init_subclass__ Undocumented
Class Variable _magics Undocumented

Inherited from Dock (via TIFile):

Method load Loads data into an instance by delegating to Loader methods based on the input's type
Class Variable loaders Undocumented
def __init__(self, *, name: str = 'UNNAMED', data: bytes = None): (source)

Creates an empty flash file with a specified name

Parameters
name:strThe name of the flash file (defaults to UNNAMED)
data:bytesThe file's data (defaults to empty)
def add_header(self, header: TIFlashHeader = None): (source)

Adds a header to this file

Parameters
header:TIFlashHeaderA TIFlashHeader to add (defaults to an empty header)
def bytes(self) -> bytes: (source)
Returns
bytesThe bytes contained in this file
def clear(self): (source)

Removes all headers from this flash file

def get_extension(self, model: TIModel = TI_84PCE) -> str: (source)

Determines the file extension for a targeted model based on its contents

Parameters
model:TIModelThe model to target (defaults to this file's minimum supported model)
Returns
strThe file's extension
def load_bytes(self, data: bytes | BytesIO): (source)

Loads a byte string or bytestream into this file

Parameters
data:bytes | BytesIOThe bytes to load
def summary(self) -> str: (source)
Returns
strA text summary of this file

Undocumented

Undocumented

Whether this flash file contains no headers