[−][src]Struct cpclib_disc::amsdos::AmsdosFileName
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]
user: u8,
filename: S1,
extension: S2
) -> Result<Self, String> where
S1: AsRef<str>,
S2: AsRef<str>,
pub fn new_incorrect_case(
user: u8,
filename: &str,
extension: &str
) -> Result<Self, String>
[src]
user: u8,
filename: &str,
extension: &str
) -> Result<Self, String>
Trait Implementations
impl Clone for AmsdosFileName
[src]
fn clone(&self) -> AmsdosFileName
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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
impl RefUnwindSafe for AmsdosFileName
impl Send for AmsdosFileName
impl Sync for AmsdosFileName
impl Unpin for AmsdosFileName
impl UnwindSafe for AmsdosFileName
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>,