Skip to main content

FPCopyFile

Struct FPCopyFile 

Source
pub struct FPCopyFile {
    pub src_volume_id: u16,
    pub src_directory_id: u32,
    pub dst_volume_id: u16,
    pub dst_directory_id: u32,
    pub src_path_type: PathType,
    pub src_path: MacString,
    pub dst_path_type: PathType,
    pub dst_path: MacString,
    pub new_name_path_type: PathType,
    pub new_name: MacString,
}
Expand description

FPCopyFile: server-side copy of a file’s data and resource forks into a destination directory.

Wire layout (from buf[2..] — after command byte and pad): [0..2] SrcVolumeID [2..6] SrcDirectoryID [6..8] DstVolumeID [8..12] DstDirectoryID [12] SrcPathType [13..] SrcPath (Pascal string) [after src] DstPathType [after src+1..] DstPath (Pascal string — the destination directory path, may be empty) [after dst] NewNamePathType [after dst+1..] NewName (Pascal string — empty means keep source name)

Fields§

§src_volume_id: u16§src_directory_id: u32§dst_volume_id: u16§dst_directory_id: u32§src_path_type: PathType§src_path: MacString§dst_path_type: PathType§dst_path: MacString§new_name_path_type: PathType§new_name: MacString

New name for the copy. Empty means keep the source file name.

Implementations§

Source§

impl FPCopyFile

Source

pub fn parse(buf: &[u8]) -> Result<Self, AfpError>

Trait Implementations§

Source§

impl Debug for FPCopyFile

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.