-
Notifications
You must be signed in to change notification settings - Fork 13
Block Type 0
mechpaul edited this page Sep 16, 2018
·
1 revision
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.