Link to home
Start Free TrialLog in
Avatar of Anuba
Anuba

asked on

Programming using CodeWarrior

I have a question regarding FSSpec in C
I do not know what its structure is??

I need to access a file whose name I know and want to use FSSpec to open it or do any other kind of access with it.

Can we identify the FSSpec of a file which is going to be created on the disk?

It would be helpful if u could give me a site to help me find more details on everything associated to file handling..it could be any kind of file.  My file contains image data and is created by a software known as IPLab.
ASKER CERTIFIED SOLUTION
Avatar of The_Raven
The_Raven

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Anuba
Anuba

ASKER

Thank u for ur suggestion, but my question isn't fully answered.  The problem is that I want say the user to decide where that file must be held.  So let's say he decide to create this new file in a directory called A.  Now how does one get the dirID/parID and vRefNum to pass to the function FSMakeFSSpec,  I don't have any idea about that.  

My software must be able to get a filename from the user and then be able to store the images captured in it.  For this I thought of using the StandardGetFile function, but then whatever is the directory or vrefnum must be known or received for me to pass it to FSMakeFSSpec.

Thanks again Raven,
Anita.
Maybe you should use StandardPutFile instead of StandardGetFile.
StandardFileReply myReply;

StandardPutFile("Save as:", "Default Name", myReply);

if (myReply.sfGood == true)
{
  FSpCreate(myReply.sfFile, 'ttxt', 'TEXT', smSystemScript);


}


There is a little sample.