Skip to main content

FPMoveAndRename

Struct FPMoveAndRename 

Source
pub struct FPMoveAndRename {
    pub volume_id: u16,
    pub src_directory_id: u32,
    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

FPMoveAndRename: atomically moves and/or renames a file or directory.

Wire layout (from buf[2..] — after command byte and pad): [0..2] VolumeID [2..6] SourceDirectoryID [6..10] DestinationDirectoryID [10] SourcePathType [11..] SourcePath (Pascal string) [11+src_len] DestinationPathType [11+src_len+1..] DestinationPath (Pascal string) [after dst] NewNamePathType [after dst+1] NewName (Pascal string — zero-length means keep original name)

Fields§

§volume_id: u16§src_directory_id: u32§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 object. Empty string means keep the original name.

Implementations§

Source§

impl FPMoveAndRename

Source

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

Trait Implementations§

Source§

impl Debug for FPMoveAndRename

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.