Skip to content

Commit

Permalink
Merge pull request #9 from mtgto/sendable
Browse files Browse the repository at this point in the history
Add Sendable to Archive and Entry
  • Loading branch information
mtgto authored Dec 28, 2024
2 parents 510d61c + 37e7414 commit 3d59975
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Sources/Unrar/Archive.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import Cunrar
import Foundation

// NOTE: This class is not thread safe.
public class Archive {
public struct Archive: Sendable {
public let fileURL: URL
public let password: String?
public let isVolume: Bool
public let hasComment: Bool // maximum comment size = 0x40000 (MAXCMTSIZE in rardefs.hpp)
public let isHeaderEncrypted: Bool
public let isFirstVolume: Bool

public convenience init(path: String, password: String? = nil) throws {
public init(path: String, password: String? = nil) throws {
try self.init(fileURL: URL(fileURLWithPath: path), password: password)
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/Unrar/Entry.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import Cunrar
import Foundation

public struct Entry: Equatable {
public struct Entry: Equatable, Sendable {
public let fileName: String // path
public let comment: String?
public let uncompressedSize: UInt64
Expand Down

0 comments on commit 3d59975

Please sign in to comment.