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 ==.Source§impl ReadEndian for DeleteDirectory
impl ReadEndian for DeleteDirectory
Source§const ENDIAN: EndianKind
const ENDIAN: EndianKind
impl Eq for DeleteDirectory
impl StructuralPartialEq for DeleteDirectory
Auto Trait Implementations§
impl Freeze for DeleteDirectory
impl RefUnwindSafe for DeleteDirectory
impl Send for DeleteDirectory
impl Sync for DeleteDirectory
impl Unpin for DeleteDirectory
impl UnsafeUnpin for DeleteDirectory
impl UnwindSafe for DeleteDirectory
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