pub struct AddDirectory {
pub name: String,
}Expand description
ADIR chunk: create a directory under the game install root.
When applied, the patcher calls create_dir_all for
<game_root>/<name>. The directory is created recursively, so intermediate
path components are created as needed. If the directory already exists the
apply step succeeds silently.
ADIR chunks appear rarely in modern FFXIV patch files; the reference notes
they are theoretically possible but seldom emitted by SE’s current patch
tooling. See lib/FFXIVQuickLauncher/.../Chunk/AddDirectoryChunk.cs.
§Wire format
[name_len: u32 BE] [name: name_len bytes, NUL-padded]name_len includes any trailing NUL bytes used for alignment padding.
The parsed AddDirectory::name field has those NULs 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/ffxiv".
Trait Implementations§
Source§impl Apply for AddDirectory
Creates a directory under the game install root.
impl Apply for AddDirectory
Creates a directory under the game install root.
Equivalent to fs::create_dir_all(game_path / name). Intermediate
directories are created as needed; the call is idempotent if the directory
already exists.
§Errors
Returns crate::ZiPatchError::Io if directory creation fails for any
reason other than the directory already existing (e.g. a permission error
or a non-directory file at the path).
Source§impl BinRead for AddDirectory
impl BinRead for AddDirectory
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 AddDirectory
impl Clone for AddDirectory
Source§fn clone(&self) -> AddDirectory
fn clone(&self) -> AddDirectory
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 AddDirectory
impl Debug for AddDirectory
Source§impl PartialEq for AddDirectory
impl PartialEq for AddDirectory
Source§fn eq(&self, other: &AddDirectory) -> bool
fn eq(&self, other: &AddDirectory) -> bool
self and other values to be equal, and is used by ==.