Re: Renaming a Directory

From: Date: Wed, 09 Sep 2009 14:13:22 +0000
Subject: Re: Renaming a Directory
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-297821@lists.php.net to get a copy of this message
Paul M Foster a écrit :
I would have thought so, but the man pages didn't mention it. I haven't use mv in ages. Makes sense that it would work, though. Moving/renaming a file would just change the name, not the inode number, which is the real key to *nix file systems.
Ashley said it, a directory is a file. But more, when you do a mv on a file, it don't rename. If the target is in the same filesystem, mv do a hard link on the source file, then unlink the original name. If you move accross filesystem, mv do a copy of the directory. If you don't believe me, get the source. -- Mickaël Wolff aka Lupus Michaelis http://lupusmic.org

« previous php.general (#297821) next »