|void||chmod (const char *path, mode_t mode)|
|void||rename (const char *oldpath, const char *newpath)|
|void||remove (const char *pathname)|
|Get the absolute pathname of the current working directory. |
|pid_t||get_file_user_pid (const char *fname)|
|Check if any processes (other than self) are using the file. |
|void rutz::unixcall::chmod||(||const char *||path,|
DESCRIPTION The mode of the file given by path is changed.
Modes are specified by or'ing the following:
EPERM The effective user id does not match the owner of the file, and is not zero. EROFS The named file resides on a read-only file system. EFAULT path points outside your accessible address space. ENAMETOOLONG path is too long. ENOENT The file does not exist. ENOMEM Insufficient kernel memory was available. ENOTDIR A component of the path prefix is not a directory. EACCES Search permission is denied on a component of the path prefix. ELOOP Too many symbolic links were encountered in resolving path. EIO An I/O error occurred.
Referenced by ExptDriver::storeData().
|pid_t rutz::unixcall::get_file_user_pid||(||const char *||fname||)|
|void rutz::unixcall::remove||(||const char *||pathname||)|
DESCRIPTION remove deletes a name from the filesystem. If that name was the last link to a file and no processes have the file open the file is deleted and the space it was using is made available for reuse.
If the name was the last link to a file but any processes still have the file open the file will remain in existence until the last file descriptor referring to it is closed.
If the name referred to a symbolic link the link is removed.
If the name referred to a socket, fifo or device the name for it is removed but processes which have the object open may continue to use it.
|void rutz::unixcall::rename||(||const char *||oldpath,|
|const char *||newpath|
DESCRIPTION rename renames a file, moving it between directories if required.
Any other hard links to the file (as created using link) are unaffected.
If newpath already exists it will be atomically overwrit- ten (subject to a few conditions - see ERRORS below), so that there is no point at which another process attempting to access newpath will find it missing.
If newpath exists but the operation fails for some reason or the system crashes rename guarantees to leave an instance of newpath in place.
However, when overwriting there will probably be a window in which both oldpath and newpath refer to the file being renamed.
If oldpath refers to a symbolic link the link is renamed; if newpath refers to a symbolic link the link will be overwritten.