mirror of
https://github.com/XcodesOrg/XcodesApp.git
synced 2026-02-06 20:28:39 +01:00
28 lines
558 B
Swift
28 lines
558 B
Swift
import Foundation
|
|
import Path
|
|
import Version
|
|
|
|
struct Downloads: Codable {
|
|
let resultCode: Int
|
|
let resultsString: String?
|
|
let downloads: [Download]?
|
|
|
|
var hasError: Bool {
|
|
return resultCode != 0
|
|
}
|
|
}
|
|
|
|
// Set to Int64 as ByteCountFormatter uses it.
|
|
public typealias ByteCount = Int64
|
|
|
|
public struct Download: Codable {
|
|
public let name: String
|
|
public let files: [File]
|
|
public let dateModified: Date
|
|
|
|
public struct File: Codable {
|
|
public let remotePath: String
|
|
public let fileSize: ByteCount
|
|
}
|
|
}
|