[plt-scheme] Cross device link?

From: Eli Barzilay (eli at barzilay.org)
Date: Thu Mar 8 15:28:41 EST 2007

On Mar  8, Richard Cobbe wrote:
> I tried it on my desktop and discovered that the error is coming
> from the rename system call (q.v.).  This is consistent with the
> documented behavior of rename: src and destination must be in the
> same filesystem.

Right -- and the reason `mv' works is that it's doing something
different when the destination is on a different filesystem.  You can
try using `mv' on a big file or directory and see that it's never
taking any time on a local move vs moving to a different FS.  You can
also try to use `mv -v' and see that after a move to a different FS it
says that the original file is removed.

In other words -- to get the `mv' behavior you'll need to catch this
error and use copy+delete instead.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!

Posted on the users mailing list.