#[repr(transparent)]pub struct FileHandle(_);
Expand description
An opaque handle to some contiguous block of data on a volume.
A FileHandle
is just a wrapper around a UEFI file handle. Under the hood, it can either be a
RegularFile
or a Directory
; use the into_type()
or the unsafe
{RegularFile, Directory}::new()
methods to perform the conversion.
Dropping this structure will result in the file handle being closed.
Implementations
Trait Implementations
sourceimpl Drop for FileHandle
impl Drop for FileHandle
sourceimpl File for FileHandle
impl File for FileHandle
sourcefn open(
&mut self,
filename: &CStr16,
open_mode: FileMode,
attributes: FileAttribute
) -> Result<FileHandle>
fn open(
&mut self,
filename: &CStr16,
open_mode: FileMode,
attributes: FileAttribute
) -> Result<FileHandle>
Try to open a file relative to this file. Read more
sourcefn get_info<'buf, Info: FileProtocolInfo + ?Sized>(
&mut self,
buffer: &'buf mut [u8]
) -> Result<&'buf mut Info, Option<usize>>
fn get_info<'buf, Info: FileProtocolInfo + ?Sized>(
&mut self,
buffer: &'buf mut [u8]
) -> Result<&'buf mut Info, Option<usize>>
Queries some information about a file Read more
sourcefn set_info<Info: FileProtocolInfo + ?Sized>(&mut self, info: &Info) -> Result
fn set_info<Info: FileProtocolInfo + ?Sized>(&mut self, info: &Info) -> Result
Sets some information about a file Read more
sourcefn flush(&mut self) -> Result
fn flush(&mut self) -> Result
Flushes all modified data associated with the file handle to the device Read more
sourcefn get_boxed_info<Info: FileProtocolInfo + ?Sized>(
&mut self
) -> Result<Box<Info>>
fn get_boxed_info<Info: FileProtocolInfo + ?Sized>(
&mut self
) -> Result<Box<Info>>
Get the dynamically allocated info for a file
Auto Trait Implementations
impl RefUnwindSafe for FileHandle
impl !Send for FileHandle
impl !Sync for FileHandle
impl Unpin for FileHandle
impl UnwindSafe for FileHandle
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more