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 ==.