

Methods for storing whiteout entries specifically, BSD Other union/overlay implementations may employ different

When not part of a union/overlay, the whiteout appears asĪ character device with a device number. (so that the version of the source file in the lower layer

Layer) and then renamed on the upper, read-write layer.Īt the same time, the source file needs to be "whiteouted" When a file that exists on the lower layer is renamed, theįile is first copied up (if not already on the upper Hide a matching file in the lower layer, making it appear A whiteout on an upper layer will effectively Multiple layers exist and only the top one is ever Rename succeeds then the whiteout will also have beenĪ "whiteout" is an object that has special meaning in The whole operation is atomic, so that if the The source of the rename at the same time as performing Specifying RENAME_WHITEOUT creates a "whiteout" object at This operation makes sense only for overlay/union * Support for many other filesystems was added in LinuxĤ.9, including ext2, minix, reiserfs, jfs, vfat, and Support for various filesystems was added as RENAME_NOREPLACE requires support from the underlyingįilesystem.

RENAME_NOREPLACE can't be employed together with Must exist but may be of different types (e.g., one couldīe a non-empty directory and the other a symbolic link).ĭon't overwrite newpath of the rename. The flags argument is a bit mask consisting of zero or more ofĪtomically exchange oldpath and newpath. With a zero flags argument is equivalent to renameat(). Renameat2() renameat2() has an additional flags argument. See openat(2) for an explanation of the need for renameat(). Referred to by the file descriptor newdirfd. Relative pathname is interpreted relative to the directory The interpretation of newpath is as for oldpath, except that a If oldpath is absolute, then olddirfd is ignored. Working directory of the calling process (like rename()). If oldpath is relative and olddirfd is the special valueĪT_FDCWD, then oldpath is interpreted relative to the current Interpreted relative to the directory referred to by the fileĭescriptor olddirfd (rather than relative to the current workingĭirectory of the calling process, as is done by rename() for a If the pathname given in oldpath is relative, then it is Rename(), except for the differences described here. The renameat() system call operates in exactly the same way as Newpath refers to a symbolic link, the link will be overwritten. If oldpath refers to a symbolic link, the link is renamed if In this case, newpath mustĮither not exist, or it must specify an empty directory. Rename() guarantees to leave an instance of newpath in place. If newpath exists but the operation fails for some reason, Same file, then rename() does nothing, and returns a success If oldpath and newpath are existing hard links referring to the Probably be a window in which both oldpath and newpath refer to That there is no point at which another process attempting toĪccess newpath will find it missing. If newpath already exists, it will be atomically replaced, so Various restrictions determine whether or not the rename Any other hard links to the file (as created using #include int renameat(int olddirfd, const char * oldpath, int newdirfd, const char * newpath ) int renameat2(int olddirfd, const char * oldpath, int newdirfd, const char * newpath, unsigned int flags ) įeature Test Macro Requirements for glibc (seeĭESCRIPTION top rename() renames a file, moving it between directories if SYNOPSIS top #include int rename(const char * oldpath, const char * newpath ) #include /* Definition of AT_* constants */ Rename, renameat, renameat2 - change the name or location of a
RENAME FOLDER LINUX MANUAL
RENAME(2) Linux Programmer's Manual RENAME(2) NAME top
