Module posish::fs[][src]

Expand description

Filesystem operations.

Structs

Access

*_OK constants for use with accessat.

AtFlags

AT_* constants for use with openat, statat, and other *at functions.

Dir

DIR*

Entry

struct dirent

FdFlags

FD_* constants for use with fcntl_getfd and fcntl_setfd.

MemfdFlags

MFD_* constants for use with memfd_create.

Mode

S_I* constants for use with openat.

OFlags

O_* constants for use with openat.

ResolveFlags

RESOLVE_* constants for use with openat2.

Enums

Advice

POSIX_FADV_* constants for use with fadvise.

FileType

S_IF* constants.

Constants

PROC_SUPER_MAGIC

The filesystem magic number for procfs.

UTIME_NOW

UTIME_NOW for use with utimensat.

UTIME_OMIT

UTIME_OMIT for use with utimensat.

Traits

DirEntryExt

Re-export types common to Posix-ish platforms.

FileExt

Re-export types common to Posix-ish platforms.

FileTypeExt

Re-export types common to Posix-ish platforms.

MetadataExt

Re-export types common to Posix-ish platforms.

OpenOptionsExt

Re-export types common to Posix-ish platforms.

Functions

accessat

faccessat(dirfd, path, access, flags)

chmodat

fchmodat(dirfd, path, mode, 0)

copy_file_range

copy_file_range(fd_in, off_in, fd_out, off_out, len, 0)

cwd

AT_FDCWD

fadvise

posix_fadvise(fd, offset, len, advice)

fchmod

fchmod(fd).

fcntl_dupfd_cloexec

fcntl(fd, F_DUPFD_CLOEXEC)

fcntl_get_seals

fcntl(fd, F_GET_SEALS)

fcntl_getfd

fcntl(fd, F_GETFD)

fcntl_getfl

fcntl(fd, F_GETFL)

fcntl_setfd

fcntl(fd, F_SETFD, flags)

fcntl_setfl

fcntl(fd, F_SETFL, flags)

fdatasync

fdatasync(fd)

fstat

fstat(fd)

fstatfs

fstatfs(fd)

fsync

fsync(fd)

ftruncate

ftruncate(fd, length)

futimens

futimens(fd, times)

is_file_read_write

fcntl(fd, F_GETFL) & O_ACCMODE.

linkat

linkat(old_dirfd, old_path, new_dirfd, new_path, flags)

major

major(dev)

makedev

makedev(maj, min)

memfd_create

memfd_create(path, flags)

minor

minor(dev)

mkdirat

mkdirat(fd, path, mode)

mknodat

mknodat(dirfd, path, mode, dev)

openat

openat(dirfd, path, oflags, mode)

openat2

openat2(dirfd, path, OpenHow { oflags, mode, resolve }, sizeof(OpenHow))

posix_fallocate

posix_fallocate(fd, offset, len)

readlinkat

readlinkat(fd, path)

renameat

renameat(old_dirfd, old_path, new_dirfd, new_path)

seek

lseek(fd, offset, whence)

sendfile

sendfile(out_fd, in_fd, offset, count)

statat

fstatat(dirfd, path, flags)

statx

statx(dirfd, path, flags, mask, statxbuf)

symlinkat

symlinkat(old_dirfd, old_path, new_dirfd, new_path)

tell

lseek(fd, 0, SEEK_CUR)

unlinkat

unlinkat(fd, path, flags)

utimensat

utimensat(dirfd, path, times, flags)

Type Definitions

Dev

dev_t.

FsWord

__fsword_t.

RawMode

mode_t.

Stat

struct stat for use with statat and fstat.

StatFs

struct statfs for use with fstatfs.

Statx

struct statx for use with statx.