Block Type 0 - mechpaul/NXPatcher GitHub Wiki
Block Type 0
If the last byte in the fileBlock's file name is '/' or '\', then it's a folder. Simply create the folder.
Otherwise, we need to create a file.
struct NewFile
{
int length;
unsigned int checksum;
unsigned char* bytes;
};
Get the length and the checksum, calculate the checksum of the file which is contained in NewFile.bytes and write the file to disk. It's fairly straightforward.