Function lrs::file::exchange

Atomically exchanges two files.

Syntax

fn exchange<P, Q>(one: P, two: Q) -> Result<(), Errno>
    where P: ToCString,
          Q: ToCString,

Arguments

NameDescription
one

File one.

two

File two.

Remarks

If the paths are relative, they will be interpreted relative to the current working directory. Both paths must refer to the same mount point or the operation fails.

Kernel versions

The required kernel version is 3.15.

See also