Mailing Lists: Apple Mailing Lists

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

RE: copying file



> Glen Fisher wrote:
>
> Philip Holland wrote:
> | Ideally, it would be hidden from the ser by the underlying
> implementation
>
> Unfortunately, that's not possible. A file fork is not merely part of the
> file's data; it's a completely separate, self-contained byte stream. (What
> Unix thinks of as "a file" is merely the "data fork" of a Mac file.)
> Copying all the forks of a file requires a separate operation for each
> fork.

OK, so it's much like the situation in NT with NTFS where the so-called
alternate data streams are inaccessible from Java (although there is little
need in NT as these are very infrequently used).

I think given Apple's commitment to Java it would be nice to have support
for accessing alternate forks in the eio API. The only support I can find is
via the 3rd party MacBinary toolkit
(http://www.amug.org/~glguerin/sw/index.html#macbinary) which uses JNI to do
this.

However, there are probably more pressing things which need attention in the
JDK before this...

> | I would think that file attributes such as type & creator codes should
> be
> | taken care of with a byte level copy
>
> Why should they? They're not part of the file's data, any more than the
> modification time or file owner are. To do what you want, the file-reading
> methods would have to know how the file data is being used, so that file
> attributes would be included if the file was being read to be copied, but
> left out if the file was being read to be used for anything else. (The
> file-writing methods would have to be similarly omniscient.)

Yes, I see your point. At least these attributes are accessible to us
through Apple's eio API.

Phil.
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Do not post admin requests to the list. They will be ignored.




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.