⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

load_tar_to_vfs

Function load_tar_to_vfs 

Source
pub fn load_tar_to_vfs(data: &[u8]) -> Result<usize, KernelError>
Expand description

Load a TAR archive from a byte buffer into the VFS.

Iterates over the 512-byte headers in data, creating directories and files in the RamFS-backed VFS. Returns the number of entries (files + directories) successfully loaded.

§Arguments

  • data - The raw bytes of a TAR archive (ustar format).

§Returns

  • Ok(count) - Number of files/directories loaded.
  • Err(KernelError) - On parse or VFS errors.