[−][src]Struct wasi_common::OsDir
A directory in the operating system's file system. Its impl of Handle
is
in sys::osdir
. This type is exposed to all other modules as
sys::osdir::OsDir
when configured.
Constructing OsDir
OsDir
can currently only be constructed from std::fs::File
using
the std::convert::TryFrom
trait:
use std::fs::OpenOptions; use std::convert::TryFrom; use std::os::windows::fs::OpenOptionsExt; use wasi_common::OsDir; use winapi::um::winbase::FILE_FLAG_BACKUP_SEMANTICS; let dir = OpenOptions::new().read(true).attributes(FILE_FLAG_BACKUP_SEMANTICS).open("some_dir").unwrap(); let os_dir = OsDir::try_from(dir).unwrap();
Trait Implementations
impl Debug for OsDir
[src]
impl Deref for OsDir
[src]
type Target = RawOsHandle
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl Handle for OsDir
[src]
fn as_any(&self) -> &dyn Any
[src]
fn try_clone(&self) -> Result<Box<dyn Handle>>
[src]
fn get_file_type(&self) -> Filetype
[src]
fn get_rights(&self) -> HandleRights
[src]
fn set_rights(&self, rights: HandleRights)
[src]
fn fdstat_get(&self) -> Result<Fdflags>
[src]
fn fdstat_set_flags(&self, fdflags: Fdflags) -> Result<()>
[src]
fn filestat_get(&self) -> Result<Filestat>
[src]
fn filestat_set_times(
&self,
atim: Timestamp,
mtim: Timestamp,
fst_flags: Fstflags
) -> Result<()>
[src]
&self,
atim: Timestamp,
mtim: Timestamp,
fst_flags: Fstflags
) -> Result<()>
fn readdir<'a>(
&'a self,
cookie: Dircookie
) -> Result<Box<dyn Iterator<Item = Result<(Dirent, String)>> + 'a>>
[src]
&'a self,
cookie: Dircookie
) -> Result<Box<dyn Iterator<Item = Result<(Dirent, String)>> + 'a>>
fn create_directory(&self, path: &str) -> Result<()>
[src]
fn filestat_get_at(&self, path: &str, follow: bool) -> Result<Filestat>
[src]
fn filestat_set_times_at(
&self,
path: &str,
atim: Timestamp,
mtim: Timestamp,
fst_flags: Fstflags,
follow: bool
) -> Result<()>
[src]
&self,
path: &str,
atim: Timestamp,
mtim: Timestamp,
fst_flags: Fstflags,
follow: bool
) -> Result<()>
fn openat(
&self,
path: &str,
read: bool,
write: bool,
oflags: Oflags,
fd_flags: Fdflags
) -> Result<Box<dyn Handle>>
[src]
&self,
path: &str,
read: bool,
write: bool,
oflags: Oflags,
fd_flags: Fdflags
) -> Result<Box<dyn Handle>>
fn link(
&self,
old_path: &str,
new_handle: Box<dyn Handle>,
new_path: &str,
follow: bool
) -> Result<()>
[src]
&self,
old_path: &str,
new_handle: Box<dyn Handle>,
new_path: &str,
follow: bool
) -> Result<()>
fn symlink(&self, old_path: &str, new_path: &str) -> Result<()>
[src]
fn readlink(&self, path: &str, buf: &mut [u8]) -> Result<usize>
[src]
fn readlinkat(&self, path: &str) -> Result<String>
[src]
fn rename(
&self,
old_path: &str,
new_handle: Box<dyn Handle>,
new_path: &str
) -> Result<()>
[src]
&self,
old_path: &str,
new_handle: Box<dyn Handle>,
new_path: &str
) -> Result<()>
fn remove_directory(&self, path: &str) -> Result<()>
[src]
fn unlink_file(&self, path: &str) -> Result<()>
[src]
fn is_directory(&self) -> bool
[src]
fn is_tty(&self) -> bool
[src]
fn advise(
&self,
_advice: Advice,
_offset: Filesize,
_len: Filesize
) -> Result<()>
[src]
&self,
_advice: Advice,
_offset: Filesize,
_len: Filesize
) -> Result<()>
fn allocate(&self, _offset: Filesize, _len: Filesize) -> Result<()>
[src]
fn datasync(&self) -> Result<()>
[src]
fn filestat_set_size(&self, _st_size: Filesize) -> Result<()>
[src]
fn preadv(&self, _buf: &mut [IoSliceMut], _offset: u64) -> Result<usize>
[src]
fn pwritev(&self, _buf: &[IoSlice], _offset: u64) -> Result<usize>
[src]
fn read_vectored(&self, _iovs: &mut [IoSliceMut]) -> Result<usize>
[src]
fn seek(&self, _offset: SeekFrom) -> Result<u64>
[src]
fn sync(&self) -> Result<()>
[src]
fn write_vectored(&self, _iovs: &[IoSlice]) -> Result<usize>
[src]
impl TryFrom<File> for OsDir
[src]
Auto Trait Implementations
impl !RefUnwindSafe for OsDir
impl !Send for OsDir
impl !Sync for OsDir
impl Unpin for OsDir
impl UnwindSafe for OsDir
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointee for T
[src]
type Pointer = u32
fn debug(
pointer: <T as Pointee>::Pointer,
f: &mut Formatter
) -> Result<(), Error>
[src]
pointer: <T as Pointee>::Pointer,
f: &mut Formatter
) -> Result<(), Error>
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,