Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Resource fork help



Hello,

I am attempting to write a Java Applet that allows a user to upload a file along with its resource fork to a server.  Basically, I would like the user to be able to point at "file.txt", and have the applet upload both the file and the resource fork creating "file.txt" and "._file.txt" on the server.  Then the server can simply zip up these two files and then redistribute them to any other OS X clients.

I have found some information on accessing the resource fork through the following Java code:
File file = new File("file.txt/..namedfork/rsrc");

However, dumping the bytes of this file to a "._file.txt" does not appear to give me the file that I want.  In fact, the bytes of this file are quite different than the one created if I drag "file.txt" to another file system (by doing something like 'cp file.txt /Volumes/foo/').

I would much prefer to be able to do this without writing any JNI, as I would like to avoid forcing all clients to install native code.  I'd much rather they be able to just use the applet on the server.

Is this at all possible?  Is there any way to transform the data from "file.txt/..namedfork/rsrc" to match the format in "._file.txt"?

Many thanks,
Sebastian Celis
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.