pub enum SqpkFileOperation {
AddFile,
RemoveAll,
DeleteFile,
MakeDirTree,
}Expand description
Operation byte of a SQPK F command; selects what the command does to
the game install tree.
Encoded as a single ASCII byte in the wire format:
b'A' → AddFile, b'R' → RemoveAll, b'D' → DeleteFile,
b'M' → MakeDirTree. Any other byte is rejected with
ZiPatchError::UnknownFileOperation.
See SqpkFile.cs in the XIVLauncher reference implementation.
Variants§
AddFile
A — write the inline compressed-block payload into a file under the
game install root, creating it (or overwriting it) as needed.
Parent directories are created automatically. If file_offset is zero,
the target file is truncated to zero before writing (full replacement);
if file_offset is non-zero, only the covered range is overwritten.
RemoveAll
R — delete all files in the expansion folder (sqpack/<expansion>/
and movie/<expansion>/) that are not on the keep-list.
Kept unconditionally: .var files and 00000.bk2–00003.bk2.
Files 00004.bk2 and beyond are deleted. expansion_id selects
the target expansion folder.
DeleteFile
D — delete a single file at the path given by SqpkFile::path.
MakeDirTree
M — create the directory tree at SqpkFile::path (equivalent to
std::fs::create_dir_all). Idempotent.
Trait Implementations§
Source§impl Clone for SqpkFileOperation
impl Clone for SqpkFileOperation
Source§fn clone(&self) -> SqpkFileOperation
fn clone(&self) -> SqpkFileOperation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SqpkFileOperation
impl Debug for SqpkFileOperation
Source§impl PartialEq for SqpkFileOperation
impl PartialEq for SqpkFileOperation
Source§fn eq(&self, other: &SqpkFileOperation) -> bool
fn eq(&self, other: &SqpkFileOperation) -> bool
self and other values to be equal, and is used by ==.impl Copy for SqpkFileOperation
impl Eq for SqpkFileOperation
impl StructuralPartialEq for SqpkFileOperation
Auto Trait Implementations§
impl Freeze for SqpkFileOperation
impl RefUnwindSafe for SqpkFileOperation
impl Send for SqpkFileOperation
impl Sync for SqpkFileOperation
impl Unpin for SqpkFileOperation
impl UnsafeUnpin for SqpkFileOperation
impl UnwindSafe for SqpkFileOperation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more