pub struct DeleteDirectory {
pub name: String,
}Expand description
DELD chunk: remove a directory under the game install root.
When applied, the patcher calls remove_dir for <game_root>/<name>.
Unlike ADIR, only an empty directory can be deleted this way; if the
directory is non-empty the OS returns an error. If
crate::ApplyContext::ignore_missing is set, a missing directory is
silently skipped instead of returning an error.
Like ADIR, DELD chunks are rare in modern patches. The reference
implementation logs failures rather than rethrowing in some paths; this
crate propagates them. See
lib/FFXIVQuickLauncher/.../Chunk/DeleteDirectoryChunk.cs.
§Wire format
[name_len: u32 BE] [name: name_len bytes, NUL-padded]Identical layout to crate::chunk::adir::AddDirectory. name_len
includes any trailing NUL padding bytes; the parsed field has them stripped.
§Errors
Parsing fails with crate::ZiPatchError::BinrwError if:
- the body is too short to contain the
name_lenfield or the declared number of name bytes (truncated input), or - the name bytes are not valid UTF-8.
Fields§
§name: StringDirectory path relative to the game install root.
Encoded as UTF-8 on the wire, length-prefixed by a u32 big-endian
byte count. Trailing NUL bytes used as alignment padding are stripped
before this field is populated. Example: "sqpack/ex3".
Trait Implementations§
Source§impl Apply for DeleteDirectory
Removes a directory from the game install root.
impl Apply for DeleteDirectory
Removes a directory from the game install root.
The directory must be empty; remove_dir (not remove_dir_all) is
used intentionally so that stale files inside the directory cause a visible
error rather than silent data loss.
If the directory does not exist and ApplyContext::ignore_missing is
true, the missing directory is logged at warn! level and Ok(()) is
returned. If ignore_missing is false, the NotFound I/O error is
propagated.
§Errors
Returns crate::ZiPatchError::Io if the removal fails for any reason
other than a missing directory with ignore_missing = true.
Source§impl BinRead for DeleteDirectory
impl BinRead for DeleteDirectory
Source§fn read_options<R: Read + Seek>(
__binrw_generated_var_reader: &mut R,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<Self>
fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<Self>
Source§fn read<R>(reader: &mut R) -> Result<Self, Error>
fn read<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments. Read moreSource§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments and assuming
big-endian byte order. Read moreSource§fn read_le<R>(reader: &mut R) -> Result<Self, Error>
fn read_le<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments and assuming
little-endian byte order. Read moreSource§fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
T from the reader assuming native-endian byte order. Read moreSource§fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Self from the reader using the given arguments. Read moreSource§fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Self from the reader, assuming big-endian byte order, using the
given arguments. Read moreSource§impl Clone for DeleteDirectory
impl Clone for DeleteDirectory
Source§fn clone(&self) -> DeleteDirectory
fn clone(&self) -> DeleteDirectory
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 DeleteDirectory
impl Debug for DeleteDirectory
Source§impl PartialEq for DeleteDirectory
impl PartialEq for DeleteDirectory
Source§fn eq(&self, other: &DeleteDirectory) -> bool
fn eq(&self, other: &DeleteDirectory) -> bool
self and other values to be equal, and is used by ==.