/third_party/rust/crates/rustix/tests/fs/ |
D | openat2.rs | 2 use rustix::fs::{cwd, mkdirat, openat, openat2, symlinkat, Mode, OFlags, ResolveFlags}; 9 oflags: OFlags, in openat2_more() argument 26 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_openat2() 32 OFlags::RDONLY | OFlags::CLOEXEC, in test_openat2() 45 OFlags::WRONLY | OFlags::CREATE | OFlags::TRUNC | OFlags::CLOEXEC, in test_openat2() 56 OFlags::RDONLY | OFlags::CLOEXEC, in test_openat2() 64 OFlags::RDONLY | OFlags::CLOEXEC, in test_openat2() 72 OFlags::RDONLY | OFlags::CLOEXEC, in test_openat2() 82 OFlags::RDONLY | OFlags::CLOEXEC, in test_openat2() 90 OFlags::RDONLY | OFlags::CLOEXEC, in test_openat2() [all …]
|
D | invalid_offset.rs | 16 use rustix::fs::{cwd, openat, seek, Mode, OFlags}; in invalid_offset_seek() 18 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in invalid_offset_seek() 22 OFlags::WRONLY | OFlags::TRUNC | OFlags::CREATE, in invalid_offset_seek() 45 use rustix::fs::{cwd, fallocate, openat, FallocateFlags, Mode, OFlags}; in invalid_offset_fallocate() 47 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in invalid_offset_fallocate() 51 OFlags::WRONLY | OFlags::TRUNC | OFlags::CREATE, in invalid_offset_fallocate() 75 use rustix::fs::{cwd, fadvise, openat, Advice, Mode, OFlags}; in invalid_offset_fadvise() 77 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in invalid_offset_fadvise() 81 OFlags::WRONLY | OFlags::TRUNC | OFlags::CREATE, in invalid_offset_fadvise() 106 use rustix::fs::{cwd, openat, Mode, OFlags}; in invalid_offset_pread() [all …]
|
D | renameat.rs | 12 use rustix::fs::{cwd, openat, renameat, statat, AtFlags, Mode, OFlags}; in test_renameat() 18 OFlags::RDONLY | OFlags::PATH, in test_renameat() 23 let _ = openat(&dir, "foo", OFlags::CREATE | OFlags::WRONLY, Mode::empty()).unwrap(); in test_renameat() 35 use rustix::fs::{cwd, openat, renameat, statat, AtFlags, Mode, OFlags}; in test_renameat_overwrite() 41 OFlags::RDONLY | OFlags::PATH, in test_renameat_overwrite() 46 let _ = openat(&dir, "foo", OFlags::CREATE | OFlags::WRONLY, Mode::empty()).unwrap(); in test_renameat_overwrite() 47 let _ = openat(&dir, "bar", OFlags::CREATE | OFlags::WRONLY, Mode::empty()).unwrap(); in test_renameat_overwrite() 57 use rustix::fs::{cwd, openat, renameat_with, statat, AtFlags, Mode, OFlags, RenameFlags}; in test_renameat_with() 63 OFlags::RDONLY | OFlags::PATH, in test_renameat_with() 68 let _ = openat(&dir, "foo", OFlags::CREATE | OFlags::WRONLY, Mode::empty()).unwrap(); in test_renameat_with() [all …]
|
D | utimensat.rs | 4 use rustix::fs::{cwd, openat, statat, utimensat, AtFlags, Mode, OFlags, Timespec, Timestamps}; in test_utimensat() 10 OFlags::RDONLY | OFlags::CLOEXEC, in test_utimensat() 18 OFlags::CREATE | OFlags::WRONLY | OFlags::CLOEXEC, in test_utimensat() 64 use rustix::fs::{cwd, openat, utimensat, AtFlags, Mode, OFlags, Timespec, Timestamps}; in test_utimensat_noent() 70 OFlags::RDONLY | OFlags::CLOEXEC, in test_utimensat_noent() 94 use rustix::fs::{cwd, openat, utimensat, AtFlags, Mode, OFlags, Timespec, Timestamps}; in test_utimensat_notdir() 100 OFlags::RDONLY | OFlags::CLOEXEC, in test_utimensat_notdir() 108 OFlags::CREATE | OFlags::WRONLY | OFlags::CLOEXEC, in test_utimensat_notdir()
|
D | openat.rs | 3 use rustix::fs::{cwd, openat, Mode, OFlags}; 12 OFlags::RDONLY | OFlags::CLOEXEC, in test_openat_tmpfile() 19 OFlags::WRONLY | OFlags::CLOEXEC | OFlags::TMPFILE, in test_openat_tmpfile()
|
D | flock.rs | 4 use rustix::fs::{cwd, flock, openat, FlockOperation, Mode, OFlags}; in test_flock() 6 let f = openat(cwd(), "Cargo.toml", OFlags::RDONLY, Mode::empty()).unwrap(); in test_flock() 9 let g = openat(cwd(), "Cargo.toml", OFlags::RDONLY, Mode::empty()).unwrap(); in test_flock() 15 let f = openat(cwd(), "Cargo.toml", OFlags::RDONLY, Mode::empty()).unwrap(); in test_flock() 17 let g = openat(cwd(), "Cargo.toml", OFlags::RDONLY, Mode::empty()).unwrap(); in test_flock() 24 let f = openat(cwd(), "Cargo.toml", OFlags::RDONLY, Mode::empty()).unwrap(); in test_flock() 28 let g = openat(cwd(), "Cargo.toml", OFlags::RDONLY, Mode::empty()).unwrap(); in test_flock()
|
D | y2038.rs | 11 cwd, fstat, openat, statat, utimensat, AtFlags, Mode, OFlags, Timespec, Timestamps, in test_y2038_with_utimensat() 16 let dir = openat(&cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_y2038_with_utimensat() 33 let _ = openat(&dir, "foo", OFlags::CREATE | OFlags::WRONLY, Mode::RUSR).unwrap(); in test_y2038_with_utimensat() 73 let file = openat(&dir, "foo", OFlags::RDONLY, Mode::empty()).unwrap(); in test_y2038_with_utimensat() 110 cwd, fstat, futimens, openat, statat, AtFlags, Mode, OFlags, Timespec, Timestamps, in test_y2038_with_futimens() 115 let dir = openat(&cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_y2038_with_futimens() 132 let file = openat(&dir, "foo", OFlags::CREATE | OFlags::WRONLY, Mode::RUSR).unwrap(); in test_y2038_with_futimens() 169 let file = openat(&dir, "foo", OFlags::RDONLY, Mode::empty()).unwrap(); in test_y2038_with_futimens()
|
D | futimens.rs | 4 use rustix::fs::{cwd, fstat, futimens, openat, Mode, OFlags, Timespec, Timestamps}; in test_futimens() 7 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_futimens() 12 OFlags::CREATE | OFlags::WRONLY | OFlags::CLOEXEC, in test_futimens()
|
D | mkdirat.rs | 4 use rustix::fs::{cwd, mkdirat, openat, statat, unlinkat, AtFlags, FileType, Mode, OFlags}; in test_mkdirat() 7 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_mkdirat() 18 use rustix::fs::{cwd, mkdirat, openat, statat, unlinkat, AtFlags, FileType, Mode, OFlags}; in test_mkdirat_with_o_path() 24 OFlags::RDONLY | OFlags::PATH, in test_mkdirat_with_o_path()
|
D | long_paths.rs | 4 use rustix::fs::{cwd, mkdirat, openat, Mode, OFlags}; in test_long_paths() 7 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_long_paths() 26 let _ = openat(&dir, &long_path, OFlags::RDONLY, Mode::empty()).unwrap(); in test_long_paths() 27 let _ = openat(&dir, &too_long_path, OFlags::RDONLY, Mode::empty()).unwrap_err(); in test_long_paths()
|
D | dir.rs | 6 rustix::fs::OFlags::RDONLY | rustix::fs::OFlags::CLOEXEC, in test_dir() 16 rustix::fs::OFlags::RDONLY | rustix::fs::OFlags::CLOEXEC, in test_dir()
|
D | file.rs | 17 rustix::fs::OFlags::RDONLY, in test_file() 27 rustix::fs::OFlags::RDONLY, in test_file() 36 rustix::fs::OFlags::RDONLY, in test_file() 62 rustix::fs::OFlags::empty() in test_file()
|
D | mknodat.rs | 9 use rustix::fs::{cwd, mknodat, openat, statat, unlinkat, AtFlags, FileType, Mode, OFlags}; in test_mknodat() 12 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_mknodat()
|
D | fcntl.rs | 10 rustix::fs::OFlags::RDONLY, in test_fcntl_dupfd_cloexec()
|
/third_party/rust/crates/rustix/tests/io/ |
D | read_write.rs | 9 use rustix::fs::{cwd, openat, Mode, OFlags}; in test_readwrite_pv() 13 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_readwrite_pv() 17 OFlags::RDWR | OFlags::CREATE | OFlags::TRUNC, in test_readwrite_pv() 47 use rustix::fs::{cwd, openat, Mode, OFlags}; in test_readwrite_p() 51 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_readwrite_p() 55 OFlags::RDWR | OFlags::CREATE | OFlags::TRUNC, in test_readwrite_p() 72 use rustix::fs::{cwd, openat, seek, Mode, OFlags}; in test_readwrite_v() 76 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_readwrite_v() 80 OFlags::RDWR | OFlags::CREATE | OFlags::TRUNC, in test_readwrite_v() 98 use rustix::fs::{cwd, openat, seek, Mode, OFlags}; in test_readwrite() [all …]
|
/third_party/rust/crates/rustix/tests/mm/ |
D | mmap.rs | 7 use rustix::fs::{cwd, openat, Mode, OFlags}; in test_mmap() 14 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_mmap() 19 OFlags::CREATE | OFlags::WRONLY | OFlags::TRUNC, in test_mmap() 26 let file = openat(&dir, "foo", OFlags::RDONLY, Mode::empty()).unwrap(); in test_mmap() 43 let file = openat(&dir, "foo", OFlags::RDONLY, Mode::empty()).unwrap(); in test_mmap()
|
/third_party/rust/crates/rustix/src/io/ |
D | procfs.rs | 22 cwd, fstat, fstatfs, major, openat, renameat, Dir, FileType, Mode, OFlags, Stat, 200 let oflags = OFlags::NOFOLLOW | OFlags::DIRECTORY | OFlags::CLOEXEC | OFlags::NOCTTY; in proc_opendirat() 412 let oflags = OFlags::RDONLY | OFlags::CLOEXEC | OFlags::NOFOLLOW | OFlags::NOCTTY; in open_and_check_file()
|
/third_party/rust/crates/rustix/src/fs/ |
D | fcntl.rs | 8 use backend::fs::types::OFlags; 27 pub fn fcntl_getfl<Fd: AsFd>(fd: Fd) -> io::Result<OFlags> { in fcntl_getfl() argument 41 pub fn fcntl_setfl<Fd: AsFd>(fd: Fd, flags: OFlags) -> io::Result<()> { in fcntl_setfl()
|
D | fd.rs | 274 if mode.contains(crate::fs::OFlags::PATH) { in _is_file_read_write() 280 match mode & crate::fs::OFlags::RWMODE { in _is_file_read_write() 281 crate::fs::OFlags::RDONLY => Ok((true, false)), in _is_file_read_write() 282 crate::fs::OFlags::RDWR => Ok((true, true)), in _is_file_read_write() 283 crate::fs::OFlags::WRONLY => Ok((false, true)), in _is_file_read_write()
|
D | openat2.rs | 4 use backend::fs::types::{Mode, OFlags, ResolveFlags}; 16 oflags: OFlags, in openat2() argument
|
D | constants.rs | 6 pub use backend::fs::types::{Access, Mode, OFlags};
|
/third_party/rust/crates/rustix/tests/process/ |
D | working_directory.rs | 4 use rustix::fs::{Mode, OFlags}; 22 let orig_fd_cwd = rustix::fs::openat(rustix::fs::cwd(), ".", OFlags::RDONLY, Mode::empty()) in test_changing_working_directory()
|
/third_party/rust/crates/rustix/src/backend/linux_raw/ |
D | conv.rs | 36 use crate::fs::{FileType, Mode, OFlags}; 470 fn oflags_bits(oflags: OFlags) -> c::c_uint { in oflags_bits() 474 if !oflags.contains(OFlags::PATH) { in oflags_bits() 483 const fn oflags_bits(oflags: OFlags) -> c::c_uint { in oflags_bits() 488 impl<'a, Num: ArgNumber> From<OFlags> for ArgReg<'a, Num> { 490 fn from(oflags: OFlags) -> Self { in from() 498 pub(super) fn oflags_for_open_how(oflags: OFlags) -> u64 { in oflags_for_open_how()
|
/third_party/rust/crates/rustix/src/backend/linux_raw/fs/ |
D | syscalls.rs | 27 Access, Advice, AtFlags, FallocateFlags, FileType, FlockOperation, MemfdFlags, Mode, OFlags, 50 pub(crate) fn open(filename: &CStr, flags: OFlags, mode: Mode) -> io::Result<OwnedFd> { in open() argument 75 flags: OFlags, in openat() argument 92 flags: OFlags, in openat2() argument 888 pub(crate) fn fcntl_getfl(fd: BorrowedFd<'_>) -> io::Result<OFlags> { in fcntl_getfl() argument 892 .map(OFlags::from_bits_truncate) in fcntl_getfl() 897 .map(OFlags::from_bits_truncate) in fcntl_getfl() 902 pub(crate) fn fcntl_setfl(fd: BorrowedFd<'_>, flags: OFlags) -> io::Result<()> { in fcntl_setfl()
|
D | dir.rs | 4 fcntl_getfl, fstat, fstatfs, fstatvfs, openat, FileType, Mode, OFlags, Stat, StatFs, StatVfs, 36 let fd_for_dir = openat(fd, cstr!("."), flags | OFlags::CLOEXEC, Mode::empty())?; in _read_from()
|