Reading Binay files in Mac

D

doublemaster007

Hi

How to read binary files in MAC OS?

FILE *readFile = fopen("filename", "rb");

then reading it like this:

count=fread(readBuffer, sizeof(char), bufferSize, readFile)

This works in windows for all type of files. But in Mac os fread fails
to read from application (.app) and plugins etc. However it succeeds
in reading zip files. [even zip file of a application]

Is it failing becoz in Mac os application are like folders or is there
any other reson?
 
J

Jim

count=fread(readBuffer, sizeof(char), bufferSize, readFile)

This works in windows for all type of files. But in Mac os fread fails
to read from application (.app) and plugins etc. However it succeeds
in reading zip files. [even zip file of a application]

Is it failing becoz in Mac os application are like folders or is there
any other reson?

MacOS .app files arn't like folders - they *are* folders.

You might be better asking here: comp.sys.mac.programmer.help

Jim
 
K

Keith Thompson

Jim said:
count=fread(readBuffer, sizeof(char), bufferSize, readFile)
This works in windows for all type of files. But in Mac os fread fails
to read from application (.app) and plugins etc. However it succeeds
in reading zip files. [even zip file of a application]

Is it failing becoz in Mac os application are like folders or is there
any other reson?

MacOS .app files arn't like folders - they *are* folders.

You might be better asking here: comp.sys.mac.programmer.help

And when you do, you should tell them *how* it fails.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top