Recovering a File (saving Or Creating a File)????

darpan

Registered
i am a new programmer on mac. I have knowledge of Mac(HFS and HFS+) file system. I have written a small programe in my pc(using visual c++) to recover files of a crashed mac HDD is connected to pc then my program is able to recover both data fork and resource fork. If we transfer both data fork and rosource fork of a file to mac machine the file run perfectly.

Now i am writing the same program on mac machine. I know the location of both data fork and resource fork . But my problem is how to associate them with each other. I have already discuss how i am writting both the files(data fork and resource fork).

if any body have some idea then plz help me

Thanks and regards
 

darpan

Registered
darpan said:
i am a new programmer on mac. I have knowledge of Mac(HFS and HFS+) file system. I have written a small programe in my pc(using visual c++) to recover files of a crashed mac HDD is connected to pc then my program is able to recover both data fork and resource fork. If we transfer both data fork and rosource fork of a file to mac machine the file run perfectly.

Now i am writing the same program on mac machine. I know the location of both data fork and resource fork . But my problem is how to associate them with each other. I have already discuss how i am writting both the files(data fork and resource fork).

if any body have some idea then plz help me

Thanks and regards


If anyone have idea plz reply me

Thanks and Regards
 

lurk

Mitä?
How are you accessing the file system? Through BSD files, using the NS* objects, some direct raw manipulation of the data on the disk like you were doing on the pc? Accessing the data of the resource fork is well documented in all these cases, well the first two anyhow. You did read the fine manual, right?
 

darpan

Registered
lurk said:
How are you accessing the file system? Through BSD files, using the NS* objects, some direct raw manipulation of the data on the disk like you were doing on the pc? Accessing the data of the resource fork is well documented in all these cases, well the first two anyhow. You did read the fine manual, right?

I am raw reading the hard disk using open(), read(),write() functions. I know how to get MDB or VIB and then how to go to Catalog file and Extent file. On pc
i am creating two files data fork and resource fork file. when i take these two file to macintosh system then these file works and open well. but when i am creating these two files on macintosh system then they not works and open well.
What should i have to do. Plz give code examples and advice where i am wrong.


Thanks and Regards
 

darpan

Registered
darpan said:
I am raw reading the hard disk using open(), read(),write() functions. I know how to get MDB or VIB and then how to go to Catalog file and Extent file. On pc
i am creating two files data fork and resource fork file. when i take these two file to macintosh system then these file works and open well. but when i am creating these two files on macintosh system then they not works and open well.
What should i have to do. Plz give code examples and advice where i am wrong.


Thanks and Regards

I am doing all this using C programming.
 

lurk

Mitä?
Ok, If I understand you correctly then you are accessing the raw disk with the exact same code via the device file. Is it the case that you can create the two files corresponding to the data fork and the resource fork but they are not associated? Do they contain the correct information?

My initial guess is that you have an endianness problem somewhere but I am not sure. That is assuming that you are doing what I think you are doing...
 

darpan

Registered
hi all

I have seen the contents of Resource Fork through Hex Editor all are ok but there is no Type/Creator information.

How i can create the Resource Fork using the C/C++ programming?


Thanks and Regards
 
Top