On 10 Feb 2012, at 13:31, Reinier Olislagers wrote:

1. Renaming is not moving???
The help says:
"RenameFile renames a file from OldName to NewName. The function returns
True if successful, False otherwise. Remark: you cannot rename across
disks or partitions."
What does this mean, then?
If you rename from e.g. /etc/b to /var/b, (and assuming they're on the
same partition), you're moving the files from one directory to another,
aren't you?

At the level of the filesystem, that is also a rename operation.

2. What is the function for "properly" moving files in FPC that also
moves between partitions, if one exists?

I don't think there is one.

Or a file copy routine (I've found only Lazarus fileutil.Copyfile)? And
could a link to that be put in the RenameFile help?

You indeed have to copy the file and then delete the original one in that case. I don't know whether there is a copyfile routine in the RTL.


Jonas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to