Hello All,
I want to get the size of the file. So I am using function
result = FSOpenFork(&ref, dataForkName.length, dataForkName.unicode, fsRdPerm, &forkRefNum);
result = FSGetForkSize(forkRefNum, &forkSize);
result = GetEOF(forkRefNum,&lfrksz);
both the functions returns filesize as 998 bytes but on disk file size shown is 4 KB that is 406 bytes.
forksize written is logical size , but how should I read the data from file. I am using. I could not understand that how should I treat the logical size, if data stored in file is serial bytes.
forkData =(void *)malloc(forkSize);
if (forkData != NULL)
{
Err1= FSReadFork(forkRefNum,fsFromStart,0, forkSize,&forkData, &actualCount);
}
if suppose f1.txt is
6790
8967
4035
etc.
I want to get the size of the file. So I am using function
result = FSOpenFork(&ref, dataForkName.length, dataForkName.unicode, fsRdPerm, &forkRefNum);
result = FSGetForkSize(forkRefNum, &forkSize);
result = GetEOF(forkRefNum,&lfrksz);
both the functions returns filesize as 998 bytes but on disk file size shown is 4 KB that is 406 bytes.
forksize written is logical size , but how should I read the data from file. I am using. I could not understand that how should I treat the logical size, if data stored in file is serial bytes.
forkData =(void *)malloc(forkSize);
if (forkData != NULL)
{
Err1= FSReadFork(forkRefNum,fsFromStart,0, forkSize,&forkData, &actualCount);
}
if suppose f1.txt is
6790
8967
4035
etc.