[quoting fixed. Don't top-post]
Quoth "news.hinet.net said:
What is the definition of the original directory and the destination
directory
are on the same file system??
The meaning is the same partition , the same filesystem type(ex. NTFS
<->NTFS) or
the same HardDisk?
Err... are you talking windows or unix here?
Windows (AFAIK) doesn't support close-behind (where a file can be
renamed without processes holding it open knowing), so you'll have to
tell the writer to stop and restart around the move.
Under Unix you can get a list of filesystems with mount(1): any two
directories that are under the same entry in mount's output are on
the same filesystem. So, if mount says
/dev/hda1 on / type reiserfs (rw,noatime)
/dev/hda2 on /usr type reiserfs (rw,noatime)
/dev/hda3 on /usr/local type reiserfs (rw,noatime)
then /, /lib, etc. are on one filesystem; /usr, /usr/lib, /usr/lib/perl5
etc. are on another and /usr/local, /usr/local/bin etc. are on a third.
You can check which filesystem a file (or directory) is on with stat:
the first member ($st->dev if you use File::stat, which I'd recommend)
gives you the device (filesystem) number, so two files are on the same
fs iff stat returns the same first member for both. Be aware that 'fake'
filesystems (such as Linux' usbfs (/proc/bus/usb) and tmpfs (often used
for /dev and /dev/shm)) may return 'undef' for this member, so be
careful to catch this.
Sorry! My english is very poor!
That's fine: don't worry about it
.
Ben