[][src]Struct nt_native::File

pub struct 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.

See FILE_ALIGNMENT_INFORMATION

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!

See FILE_MODE_INFORMATION

pub fn is_remote(&self) -> Result<bool>[src]

Returns whether the file system that contains the file is a remote file system.

See FILE_IS_REMOTE_DEVICE_INFORMATION

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.

See FILE_NAME_INFORMATION

pub fn set_end_of_file(&self, end_of_file: u64) -> Result<()>[src]

Trait Implementations

impl AsRawHandle for File[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]

impl IntoRawHandle for File[src]

impl Read for File[src]

impl Read for File[src]

impl ReadAt for File[src]

impl Seek for File[src]

impl Seek for File[src]

impl Size for File[src]

impl Write for File[src]

impl Write for File[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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.