[−][src]Function librapidarchive::tar::header::headergen
pub fn headergen(
entry_path: &Path,
archival_path: &Path,
tarheader: TarHeader,
format: TarFormat
) -> Result<HeaderGenResult>
Given a directory entry's path and metadata, produce a valid HeaderGenResult for a given path.
headergen attempts to precache the file's contents in the HeaderGenResult. A maximum of 1MB is read and stored in the HeaderGenResult. If the read fails or the item is not a file then the file_prefix field will be None.
TODO: Make headergen read-ahead caching maximum configurable.