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



Philip Holland wrote:
| However, I'm unsure how Apple Java deals with forked files as I don't think
| I've ever tried to copy one with Java!

It probably ignores the resource fork, just as all regular I/O does. (Even on OS 9, regular I/O ignores the resource fork.)


| 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.


| 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.)

Glen Fisher
_______________________________________________
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.


References: 
 >RE: copying file (From: "Philip Holland" <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.