Module rustix::fs

source ·
Available on crate feature fs only.
Expand description

Filesystem operations.

Re-exports§

Structs§

Enums§

Traits§

Functions§

  • access(path, access)—Tests permissions for a file or directory.
  • chmod(path, mode)—Sets file or directory permissions.
  • chown(path, owner, group)—Sets open file or directory ownership.
  • fchmod(fd, mode)—Sets open file or directory permissions.
  • fchown(fd, owner, group)—Sets open file or directory ownership.
  • fcntl(fd, F_GETFL)—Returns a file descriptor’s access mode and status.
  • fcntl(fd, F_SETFL, flags)—Sets a file descriptor’s status.
  • flock(fd, operation)—Acquire or release an advisory lock on an open file.
  • fstat(fd)—Queries metadata for an open file or directory.
  • fsync(fd)—Ensures that file data and metadata is written to the underlying storage device.
  • ftruncate(fd, length)—Sets the length of a file.
  • futimens(fd, times)—Sets timestamps for an open file or directory.
  • fcntl(fd, F_GETFL) & O_ACCMODE
  • link(old_path, new_path)—Creates a hard link.
  • lstat(path)—Queries metadata for a file or directory, without following symlinks.
  • mkdir(path, mode)—Creates a directory.
  • open(path, oflags, mode)—Opens a file.
  • readlink(path)—Reads the contents of a symlink.
  • rename(old_path, new_path)—Renames a file or directory.
  • rmdir(path)—Removes a directory.
  • lseek(fd, offset, whence)—Repositions a file descriptor within a file.
  • stat(path)—Queries metadata for a file or directory.
  • symlink(old_path, new_path)—Creates a symlink.
  • lseek(fd, 0, SEEK_CUR)—Returns the current position within a file.
  • unlink(path)—Unlinks a file.

Type Aliases§