licence_audit/source_archive

Types

pub type ArchiveError {
  InvalidArchive
  MissingContentsArchive
  MissingRootFile
  InvalidText(path: String)
}

Constructors

  • InvalidArchive
  • MissingContentsArchive
  • MissingRootFile
  • InvalidText(path: String)
pub type ArchiveFile {
  ArchiveFile(path: String, contents: BitArray)
}

Constructors

  • ArchiveFile(path: String, contents: BitArray)

Values

pub fn describe_error(error: ArchiveError) -> String
pub fn extract_hex_contents(
  data: BitArray,
) -> Result(List(ArchiveFile), ArchiveError)
pub fn extract_hex_contents_selected(
  data: BitArray,
  select: fn(List(String)) -> List(#(String, String)),
) -> Result(List(ArchiveFile), ArchiveError)
pub fn extract_package_file_tar_gz(
  data: BitArray,
  directory: String,
  filename: String,
) -> Result(BitArray, ArchiveError)
pub fn extract_root_file_tar_gz(
  data: BitArray,
  filename: String,
) -> Result(BitArray, ArchiveError)
pub fn extract_tar(
  data: BitArray,
) -> Result(List(ArchiveFile), ArchiveError)
pub fn extract_tar_gz(
  data: BitArray,
) -> Result(List(ArchiveFile), ArchiveError)
pub fn extract_tar_gz_selected(
  data: BitArray,
  select: fn(List(String)) -> List(#(String, String)),
) -> Result(List(ArchiveFile), ArchiveError)

Select archive members from the full regular-file inventory before loading their contents. Each selected pair contains the member and its output path.

pub const max_decompressed_bytes: Int
pub fn package_paths(
  paths: List(String),
  directory: String,
) -> List(#(String, String))

Scope the full inventory before selecting files or inferring package roots.

pub fn sha256_hex(data: BitArray) -> Result(String, ArchiveError)
pub fn text_contents(
  file: ArchiveFile,
) -> Result(String, ArchiveError)
✨ Search Document