Cocoa File Copy on MacOS X
Cocoa File Copy on MacOS X
- Subject: Cocoa File Copy on MacOS X
- From: Lorenzo Puleo <email@hidden>
- Date: Sat, 06 Apr 2002 20:11:45 +0200
I can't believe this:
I know two ways to copy a file with Cocoa:
1)
[myWorkSpace performFileOperation:NSWorkspaceCopyOperation source:sourceDir
destination:destDir files:singleItem tag:&theTag];
2)
[manager copyPath:sourceItem toPath:destItem handler:nil];
Both of them copy the file, but in some cases they produce bad result. In
some cases no resource fork was been copied, the creation and modification
dates of the destination file report the present date/time, in other cases
If the source file is "read only" I can't later set the right attributes
(read: modification and creation date) of the destination file... Also, I
can't see a way to set the creation date of the destination file equal to
the source file one. Actually I use an old C++ routine. May be I have to
learn more about Cocoa. So please help me.
Someone in this mailing list suggested to use MoreFiles routines...
(again?).
I can't believe Apple didn't yet grant a simple, easy, fast and secure way
to copy a file (just as the Finder used to do) in ANY condition, to ANY file
system, to ANY remote server, EVERYTHING, EVERYWHERE, ALWAYS, FOREVER.
Please what should I do to simply copy any kind of file?
Do I have still to write/review thousands of C++ code-lines? Still now?
How long a Mac application development time should be?
Please let me know. Thanks.
--
Lorenzo Puleo
email@hidden
archidea at tin.it :-)
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.