Function sparse::build_sparse_files

source ·
pub fn build_sparse_files<W: Write>(
    writer: &mut W,
    name: &str,
    file_to_upload: &str,
    dir: &Path,
    max_download_size: u64
) -> Result<Vec<TempPath>>
Expand description

Takes the given file_to_upload for the named partition and creates a set of temporary files in the given dir in Sparse Image Format. With the provided max_download_size constraining file size.

§Arguments

  • writer - Used for writing log information.
  • name - Name of the partition the image. Used for logs only.
  • file_to_upload - Path to the file to translate to sparse image format.
  • dir - Path to write the Sparse file(s).
  • max_download_size - Maximum size that can be downloaded by the device.