pub struct ShortFileName { /* private fields */ }
Expand description
An MS-DOS 8.3 filename.
ISO-8859-1 encoding is assumed. All lower-case is converted to upper-case by default.
Implementations§
Source§impl ShortFileName
impl ShortFileName
Sourcepub const fn parent_dir() -> Self
pub const fn parent_dir() -> Self
Get a short file name containing “..”, which means “parent directory”.
Sourcepub const fn this_dir() -> Self
pub const fn this_dir() -> Self
Get a short file name containing “.”, which means “this directory”.
Sourcepub fn create_from_str(name: &str) -> Result<ShortFileName, FilenameError>
pub fn create_from_str(name: &str) -> Result<ShortFileName, FilenameError>
Create a new MS-DOS 8.3 space-padded file name as stored in the directory entry.
The output uses ISO-8859-1 encoding.
Sourcepub unsafe fn to_volume_label(self) -> VolumeName
pub unsafe fn to_volume_label(self) -> VolumeName
Convert a Short File Name to a Volume Label.
§Safety
Volume Labels can contain things that Short File Names cannot, so only do this conversion if you have the name of a directory entry with the ‘Volume Label’ attribute.
Trait Implementations§
Source§impl Clone for ShortFileName
impl Clone for ShortFileName
Source§fn clone(&self) -> ShortFileName
fn clone(&self) -> ShortFileName
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ShortFileName
impl Debug for ShortFileName
Source§impl Display for ShortFileName
impl Display for ShortFileName
Source§impl PartialEq for ShortFileName
impl PartialEq for ShortFileName
Source§impl ToShortFileName for &ShortFileName
impl ToShortFileName for &ShortFileName
Source§fn to_short_filename(self) -> Result<ShortFileName, FilenameError>
fn to_short_filename(self) -> Result<ShortFileName, FilenameError>
Try and convert this value into a
ShortFileName
.Source§impl ToShortFileName for ShortFileName
impl ToShortFileName for ShortFileName
Source§fn to_short_filename(self) -> Result<ShortFileName, FilenameError>
fn to_short_filename(self) -> Result<ShortFileName, FilenameError>
Try and convert this value into a
ShortFileName
.impl Eq for ShortFileName
impl StructuralPartialEq for ShortFileName
Auto Trait Implementations§
impl Freeze for ShortFileName
impl RefUnwindSafe for ShortFileName
impl Send for ShortFileName
impl Sync for ShortFileName
impl Unpin for ShortFileName
impl UnwindSafe for ShortFileName
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more