Skip to main content

Module os

Module os 

Source

Re-exports§

pub use crate::posix_unix_like::rename;

Modules§

ffi
Unix-specific extensions to primitives in the std::ffi module.

Structs§

AccessMode
ChFlags

Enums§

AccessFlag
ChFlag
BSD chflags bits. Values are bit positions; masks are 1 << pos.

Constants§

AT_EACCESS
AT_FDCWD
AT_REMOVEDIR
AT_SYMLINK_FOLLOW
AT_SYMLINK_NOFOLLOW
F_OK
O_ACCMODE
O_APPEND
open(2) flags. libc on hosts that bind them; Darwin/BSD numbers on wasm32-unknown-unknown, matching the guest errno table.
O_ASYNC
O_CLOEXEC
O_CREAT
open(2) flags. libc on hosts that bind them; Darwin/BSD numbers on wasm32-unknown-unknown, matching the guest errno table.
O_DIRECT
O_DIRECTORY
O_DSYNC
O_EXCL
open(2) flags. libc on hosts that bind them; Darwin/BSD numbers on wasm32-unknown-unknown, matching the guest errno table.
O_LARGEFILE
O_NDELAY
O_NOATIME
O_NOCTTY
O_NOFOLLOW
O_NONBLOCK
O_PATH
O_RDONLY
open(2) flags. libc on hosts that bind them; Darwin/BSD numbers on wasm32-unknown-unknown, matching the guest errno table.
O_RDWR
open(2) flags. libc on hosts that bind them; Darwin/BSD numbers on wasm32-unknown-unknown, matching the guest errno table.
O_RSYNC
O_SYNC
O_TMPFILE
O_TRUNC
open(2) flags. libc on hosts that bind them; Darwin/BSD numbers on wasm32-unknown-unknown, matching the guest errno table.
O_WRONLY
open(2) flags. libc on hosts that bind them; Darwin/BSD numbers on wasm32-unknown-unknown, matching the guest errno table.
R_OK
SF_APPEND
SF_ARCHIVED
SF_DATALESS
SF_FIRMLINK
SF_IMMUTABLE
SF_NOUNLINK
SF_SETTABLE
SF_SNAPSHOT
ST_NOSUID
ST_RDONLY
S_IFDOOR
Solaris door/port and BSD whiteout. _stat publishes 0 where the platform has no such file type.
S_IFPORT
S_IFWHT
UF_APPEND
UF_COMPRESSED
UF_DATAVAULT
UF_HIDDEN
UF_IMMUTABLE
UF_NODUMP
UF_NOUNLINK
UF_OPAQUE
UF_SETTABLE
UF_TRACKED
W_OK
X_OK

Traits§

CheckLibcResult
Convert a libc-style return value into an io::Result.
CheckLibcZero
libc convention where 0 means success and any non-zero value indicates failure (with errno set). Used by APIs like sigemptyset, sigaction, pthread_*, etc.
ErrorExt

Functions§

abort
Wrapper around the C abort() call: terminates the process abnormally.
alloc_granularity
bytes_as_os_str
clear_errno
copy_file_range
cpu_count
current_dir
device_encoding
errno_io_error
exit
exit_code
Convert exit code to std::process::ExitCode
get_errno
isatty
page_size
process_id
remove_var⚠
Safety
seek_fd
set_current_dir
set_errno
set_var⚠
Safety
system
temp_dir
urandom
Read size cryptographically random bytes from the OS.
var
var_os
vars
vars_os