Creates an empty SmileBASIC file instance.
The content of the file, stored in a SmileBASIC4ProjectContent instance.
Stores the SHA-1 HMAC footer of this file, if present. META files do not have a footer.
The parsed Header of this file.
Stores the raw contents of this file as a raw Buffer.
Maps SmileBASICFileTypes to different SmileBASIC file subtypes.
Used by ToActualType()
Returns the type of file as a normalized SmileBASICFileType, or null
if the file type is invalid.
Converts a SmileBASICFile instance to a SmileBASICDataFile.
Converts a SmileBASICFile instance to a SmileBASICJpegFile.
Converts a SmileBASICFile instance to a SmileBASICMetaFile.
Converts a SmileBASICFile instance to a SmileBASIC3ProjectFile.
Converts a SmileBASICFile instance to a SmileBASIC4ProjectFile.
Converts a SmileBASICFile instance to a SmileBASICTextFile.
Calculates the footer for the expected content, writing it to the Footer property of this instance.
Returns the raw file content, compressed using zlib compression.
A Promise, resolving to a Buffer containing the compressed content.
Converts the file to its actual type.
A Promise, resolving to the specific SmileBASICFile subclass for this instance's type.
Encodes the file to a Buffer containing a raw SmileBASIC file.
A Promise resolving to a Buffer containing the raw SmileBASIC file.
Creates a SmileBASIC4ProjectFile instance from the provided SmileBASIC format file (as a Buffer). Optionally, also verify the footer and throw an error if it is incorrect.
A Buffer storing a raw SmileBASIC file
Set to true
to throw an error if the file has an invalid footer.
A Promise resolving to a SmileBASIC4ProjectFile instance.
Converts a base SmileBASICFile instance into a SmileBASIC4ProjectFile.
The base SmileBASICFile instance to convert.
A Promise resolving to the input file, converted to a SmileBASIC4ProjectFile instance.
Verifies the footer of a (presumed) SmileBASIC file in a Buffer.
A Buffer storing a raw SmileBASIC file
true
if the footer is correct, false
otherwise.
Generated using TypeDoc
Implements operations for reading and writing SmileBASIC SmileBASICFileType.Project4 files.