[][src]Struct cpclib_disc::amsdos::AmsdosFileName

pub struct AmsdosFileName { /* fields omitted */ }

The AmsdosFileName structure is used to encode several informations

  • the user
  • the filename (up to 8 chars)
  • the extension (up to 3 chars) It does not contain property information

Methods

impl AmsdosFileName[src]

pub fn filename_header_format(&self) -> &[u8; 8][src]

pub fn extension_header_format(&self) -> &[u8; 3][src]

pub fn from_slice(slice: &[u8]) -> Self[src]

pub fn from_entry_format(buffer: &[u8; 12]) -> Self[src]

Create an amsdos filename from a catalog entry buffer

pub fn to_entry_format(&self, system: bool, read_only: bool) -> [u8; 12][src]

Build a filename compatible with the catalog entry format

pub fn user(&self) -> u8[src]

pub fn set_user(&mut self, user: u8)[src]

pub fn name(&self) -> String[src]

pub fn extension(&self) -> String[src]

pub fn filename(&self) -> String[src]

pub fn filename_with_user(&self) -> String[src]

pub fn set_filename<S: AsRef<str>>(&mut self, filename: S)[src]

pub fn set_name<S: AsRef<str>>(&mut self, name: S)[src]

pub fn set_extension<S: AsRef<str>>(&mut self, extension: S)[src]

pub fn is_valid(&self) -> bool[src]

pub fn is_valid_char(char: u8) -> bool[src]

pub fn new_correct_case<S1, S2>(
    user: u8,
    filename: S1,
    extension: S2
) -> Result<Self, String> where
    S1: AsRef<str>,
    S2: AsRef<str>, 
[src]

pub fn new_incorrect_case(
    user: u8,
    filename: &str,
    extension: &str
) -> Result<Self, String>
[src]

Trait Implementations

impl Clone for AmsdosFileName[src]

impl Copy for AmsdosFileName[src]

impl Debug for AmsdosFileName[src]

impl<S: AsRef<str>> From<S> for AmsdosFileName[src]

fn from(content: S) -> Self[src]

Make a filename conversion by considering the following format is used: user:name.extension

impl PartialEq<AmsdosFileName> for AmsdosFileName[src]

Auto Trait Implementations

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.