[−][src]Struct cpclib_disc::amsdos::AmsdosManager
http://cpctech.cpc-live.com/docs/manual/s968se09.pdf Current implementatin only focus on DATA format
Methods
impl AmsdosManager
[src]
pub fn dsk(&self) -> &ExtendedDsk
[src]
pub fn dsk_mut(&mut self) -> &mut ExtendedDsk
[src]
pub fn new_from_disc<S: Into<Head>>(disc: ExtendedDsk, head: S) -> Self
[src]
pub fn format(&mut self)
[src]
Format the disc. Currently it only modifies the catalog
pub fn catalog(&self) -> AmsdosEntries
[src]
Return the entries of the Amsdos catalog Panic if dsk is not compatible
pub fn set_catalog(&mut self, entries: &AmsdosEntries)
[src]
Rewrite the whole catalog
pub fn print_catalog(&self)
[src]
Print the catalog on screen
pub fn compute_basic_header(
filename: &AmsdosFileName,
data: &[u8]
) -> AmsdosHeader
[src]
filename: &AmsdosFileName,
data: &[u8]
) -> AmsdosHeader
Generate a header for a basic file
pub fn compute_binary_header(
filename: &AmsdosFileName,
loading_address: u16,
execution_address: u16,
data: &[u8]
) -> AmsdosHeader
[src]
filename: &AmsdosFileName,
loading_address: u16,
execution_address: u16,
data: &[u8]
) -> AmsdosHeader
Generate a header for binary file
pub fn get_file<F: Into<AmsdosFileName>>(
&self,
filename: F
) -> Option<AmsdosFile>
[src]
&self,
filename: F
) -> Option<AmsdosFile>
Return the file if it exists
pub fn add_file(
&mut self,
file: &AmsdosFile,
is_system: bool,
is_read_only: bool
) -> Result<(), AmsdosError>
[src]
&mut self,
file: &AmsdosFile,
is_system: bool,
is_read_only: bool
) -> Result<(), AmsdosError>
Add the given amsdos file to the disc Code is greatly inspired by idsk with no special verifications. In case of error, the disk is in a broken state => part of the file may be stored...
pub fn padding(data: &[u8], size: usize) -> Vec<u8>
[src]
Returns a Vec
pub fn update_entry(&mut self, entry: &AmsdosEntry)
[src]
Write the entry information on disc AFTER the sectors has been set up. Panic if dsk is invalid Still stolen to iDSK
pub fn update_bloc(&mut self, bloc_idx: BlocIdx, content: &[u8])
[src]
Write bloc content on disc. One bloc use 2 sectors Implementation is stolen to iDSK
pub fn read_bloc(&self, bloc_idx: BlocIdx) -> Vec<u8>
[src]
Read the content of the given bloc
pub fn read_entry(&self, entry: &AmsdosEntry) -> Vec<u8>
[src]
Read the content of the given entry
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for AmsdosManager
impl Send for AmsdosManager
impl Sync for AmsdosManager
impl Unpin for AmsdosManager
impl UnwindSafe for AmsdosManager
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, 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>,