Module libxivdat::dat_file[][src]

Expand description

Contains a generic, low-level tool set for working with any standard binary DAT files. This provides the convenience functions read_content() and write_content() as well as the std::fs::File-like DATFile interface.

Structs

A reference to an open DAT file on the system. This emulates the standard lib std::fs::File but provides additional DAT-specific functionality.

Constants

Header size in bytes.

Functions

Checks the DATType of a DAT file based on the header contents. This should be treated as a best guess, since the header is not fully understood.

Tries to read an 0x11 length byte array as a DAT file header. Returns a tuple containing (file_type, max_size, content_size, header_end_byte).

Attempts to read the entire content block of a DAT file, returning a byte vector. This is a convenience function similar to std::fs::read that automatically handles opening and closing the underlying file.

Attempts to write an input buffer as the content block of a DAT File, replacing the entire existing contents and returning the number of bytes written. This is a convenience function that automatically handles opening and closing the underlying file.