06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

move_f pHILE+ <strong>System</strong> <strong>Calls</strong><br />

move_f Moves (renames) a file.<br />

#include <br />

unsigned long move_f(<br />

char *oldname, /* old pathname */<br />

char *newname /* new pathname */<br />

)<br />

Volume Types<br />

Description<br />

Arguments<br />

All volume types, except CD-ROM; however, some behavioral differences exist and<br />

are described here.<br />

move_f() changes the pathname associated with a file.<br />

With one exception, the pHILE+ file system manager can move both ordinary and<br />

directory files on all volume types. The exception is directory files on MS-DOS<br />

formatted volumes, which cannot be moved. When a directory is moved, the<br />

directory and all files in the directory's subtree are moved.<br />

Conceptually, move_f() moves a file by changing control structures on the volume<br />

(but no actual movement of data ever occurs). Therefore, oldname and newname<br />

must be on the same volume.<br />

oldname Points to the null-terminated old pathname.<br />

newname Points to the null-terminated new pathname.<br />

If oldname and newname are in the same directory, move_f() simply renames the<br />

file. Otherwise, move_f() has the effect of moving the file to a different location<br />

within the volume's directory tree. move_f() does not change the size or contents of<br />

the file.<br />

move_f() fails if newname already exists or if the move operation would create a<br />

non-tree directory organization (for example, when a directory file is moved to its<br />

own subtree.)<br />

2-70 <strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!