Re: Um... How do you rename a file?
Re: Um... How do you rename a file?
- Subject: Re: Um... How do you rename a file?
- From: Ken Tozier <email@hidden>
- Date: Thu, 25 Mar 2004 06:47:01 -0500
I'll try that, thanks.
>
I don't understand why you rule out movePath:toPath? It seem to me
>
that it is the equivalent of a "mv" shell command, which is a rename
>
operation, as well as a move operation. Isn't it obvious that
>
"destination must not yet exist", if you're going to rename a file?
I'm not a unix guy, so, to me, move (or mv) means physically transfer a
file to a completely different location.
The documentation states two things which seem in clear conflict (or at
least extremely wasteful) as I read it
1. "the method CREATES a file at destination that holds the exact
contents of the original file and then DELETES the original file"
2. The file specified in source must exist, while destination must not
yet exist.
This says to me that the system creates a new file at destination and
copies the entire contents no matter how many tens or hundreds of
megabytes it might be, then deletes the original. I'm sure it's not,
but that how it reads. Contrast that with:
[aFile setName:@"jim bob"]
Done. Much easier and much more intuitive than moving a file you're not
really moving.
Just my preference
Ken
_______________________________________________
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.