[−][src]Struct nt_native::File
Methods
impl File
[src]
pub fn create_new(name: &NtString) -> Result<Self>
[src]
pub fn create_preallocated(name: &NtString, size: u64) -> Result<Self>
[src]
pub fn open(name: &NtString) -> Result<Self>
[src]
pub fn open_readonly(name: &NtString) -> Result<Self>
[src]
pub fn open_or_create(name: &NtString) -> Result<(Self, bool)>
[src]
pub fn owerwrite(name: &NtString) -> Result<Self>
[src]
pub fn owerwrite_or_create(name: &NtString) -> Result<(Self, bool)>
[src]
impl File
[src]
pub fn is_valid(&self) -> bool
[src]
pub fn close(&mut self) -> Result<()>
[src]
pub fn object_name(&self) -> Result<NtString>
[src]
impl File
[src]
pub fn pos(&self) -> Result<u64>
[src]
pub fn set_pos(&self, pos: u64) -> Result<u64>
[src]
pub fn size(&self) -> Result<u64>
[src]
pub fn size_on_disk(&self) -> Result<u64>
[src]
pub fn access_mask(&self) -> Result<Access>
[src]
pub fn alignment(&self) -> Result<usize>
[src]
Returns the buffer alignment required by the underlying device.
pub fn mode(&self) -> Result<Options>
[src]
Returns the access mode of a file.
This flags are is only a subset of all possible Options flags!
pub fn is_remote(&self) -> Result<bool>
[src]
Returns whether the file system that contains the file is a remote file system.
pub fn path_name(&self) -> Result<NtString>
[src]
Returns the pathname of a file or directory without a drive letter(volume). The volume can be mounted as a mountpoint, so using drive letters in low-level code is a very bad idea.
If the ObjectAttributes->RootDirectory handle was opened by file ID, path_name()
returns the relative path.
If only the relative path is returned, the file name string will not begin with a backslash.
pub fn set_end_of_file(&self, end_of_file: u64) -> Result<()>
[src]
Trait Implementations
impl AsRawHandle for File
[src]
fn as_raw_handle(&self) -> RawHandle
[src]
impl Clone for File
[src]
impl Debug for File
[src]
impl Flush for File
[src]
impl From<Handle> for File
[src]
impl FromRawHandle for File
[src]
unsafe fn from_raw_handle(handle: RawHandle) -> Self
[src]
impl IntoRawHandle for File
[src]
fn into_raw_handle(self) -> RawHandle
[src]
impl Read for File
[src]
impl Read for File
[src]
fn read(&mut self, buf: &mut [u8]) -> Result<usize>
[src]
fn read_vectored(&mut self, bufs: &mut [IoSliceMut]) -> Result<usize, Error>
1.36.0[src]
unsafe fn initializer(&self) -> Initializer
[src]
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
1.0.0[src]
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
1.0.0[src]
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
1.6.0[src]
fn by_ref(&mut self) -> &mut Self
1.0.0[src]
fn bytes(self) -> Bytes<Self>
1.0.0[src]
fn chain<R>(self, next: R) -> Chain<Self, R> where
R: Read,
1.0.0[src]
R: Read,
fn take(self, limit: u64) -> Take<Self>
1.0.0[src]
impl ReadAt for File
[src]
impl Seek for File
[src]
fn seek(&self, to: SeekFrom) -> Result<u64>
[src]
fn stream_position(&self) -> Result<u64>
[src]
fn stream_len(&self) -> Result<u64>
[src]
impl Seek for File
[src]
fn seek(&mut self, pos: SeekFrom) -> Result<u64>
[src]
fn stream_len(&mut self) -> Result<u64, Error>
[src]
fn stream_position(&mut self) -> Result<u64, Error>
[src]
impl Size for File
[src]
impl Write for File
[src]
impl Write for File
[src]
fn write(&mut self, buf: &[u8]) -> Result<usize>
[src]
fn flush(&mut self) -> Result<()>
[src]
fn write_vectored(&mut self, bufs: &[IoSlice]) -> Result<usize, Error>
1.36.0[src]
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
1.0.0[src]
fn write_all_vectored(&mut self, bufs: &mut [IoSlice]) -> Result<(), Error>
[src]
fn write_fmt(&mut self, fmt: Arguments) -> Result<(), Error>
1.0.0[src]
fn by_ref(&mut self) -> &mut Self
1.0.0[src]
impl WriteAt for File
[src]
Auto Trait Implementations
impl RefUnwindSafe for File
impl Send for File
impl Sync for File
impl Unpin for File
impl UnwindSafe for File
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,