class documentation
Container for var files
A var file is composed of a header and any number of entries (though most have only one).
| Method | __bool__ |
No summary |
| Method | __init__ |
Creates an empty var with a specified name, header, and targeted model |
| Method | add |
Adds an entry to this var |
| Method | bytes |
No summary |
| Method | clear |
Removes all entries from this var |
| Method | get |
Determines the file extension for a targeted model based on its contents |
| Method | load |
Loads a byte string or bytestream into this file |
| Method | save |
Saves this file given a filename |
| Method | summary |
No summary |
| Method | supported |
Determines whether this file supports a given model |
| Method | targets |
Determines whether this file targets a given model |
| Instance Variable | entries |
Undocumented |
| Instance Variable | header |
Undocumented |
| Property | checksum |
The checksum for the var |
| Property | entry |
The total length of the var entries |
| Property | is |
Whether this var contains no entries |
Inherited from TIFile:
| Class Method | get |
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 | __bytes__ |
No summary |
| Method | __copy__ |
No summary |
| Method | __eq__ |
Determines if two files are identical |
| Method | __format__ |
Undocumented |
| Method | __len__ |
No summary |
| Method | get |
Determines the filename based on the instance name and targeted model |
| Method | load |
Loads this file from a file pointer |
| Class Variable | magics |
Undocumented |
| Instance Variable | name |
Undocumented |
| Method | __init |
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', header: TIHeader = None, data: bytes = None):
(source)
¶
overrides
tivars.file.TIFile.__init__overrides
tivars.file.TIFile.checksumThe checksum for the var
This is equal to the lower 2 bytes of the sum of all bytes in the entries.