/// <summary> /// Reads an 'ar' archive file from the specified stream. /// </summary> /// <param name="stream">The stream to read 'ar' a archive file from.</param> /// <param name="archiveKind">The type of 'ar' archive to read.</param> /// <returns>An instance of <see cref="ArArchiveFile"/> if the read was successful.</returns> /// <exception cref="ObjectFileException">In case of an invalid file.</exception> public static ArArchiveFile Read(Stream stream, ArArchiveKind archiveKind) { return(Read(stream, new ArArchiveFileReaderOptions(archiveKind))); }
/// <summary> /// Tries to reads an 'ar' archive file from the specified stream. /// </summary> /// <param name="stream">The stream to read 'ar' a archive file from.</param> /// <param name="archiveKind">The type of 'ar' archive to read.</param> /// <param name="arArchiveFile">The output 'ar' archive file if the read was successful.</param> /// <param name="diagnostics">The output associated diagnostics after reading the archive.</param> /// <returns><c>true</c> An instance of <see cref="ArArchiveFile"/> if the read was successful.</returns> public static bool TryRead(Stream stream, ArArchiveKind archiveKind, out ArArchiveFile arArchiveFile, out DiagnosticBag diagnostics) { return(TryRead(stream, new ArArchiveFileReaderOptions(archiveKind), out arArchiveFile, out diagnostics)); }
/// <summary> /// Initializes a new instance. /// </summary> /// <param name="archiveKind">Type of the 'ar' file to load (GNU, BSD...)</param> public ArArchiveFileReaderOptions(ArArchiveKind archiveKind) { ArchiveKind = archiveKind; ProcessObjectFiles = true; }