LocalFile

public struct LocalFile : Codable, Equatable, FunctionResult

Represents a local file

  • Local path to the locally available file part; may be empty

    Declaration

    Swift

    public let path: String
  • True, if it is possible to try to download or generate the file

    Declaration

    Swift

    public let canBeDownloaded: Bool
  • True, if the file can be deleted

    Declaration

    Swift

    public let canBeDeleted: Bool
  • True, if the file is currently being downloaded (or a local copy is being generated by some other means)

    Declaration

    Swift

    public let isDownloadingActive: Bool
  • True, if the local copy is fully available

    Declaration

    Swift

    public let isDownloadingCompleted: Bool
  • Download will be started from this offset. downloaded_prefix_size is calculated from this offset

    Declaration

    Swift

    public let downloadOffset: Int32
  • If is_downloading_completed is false, then only some prefix of the file starting from download_offset is ready to be read. downloaded_prefix_size is the size of that prefix

    Declaration

    Swift

    public let downloadedPrefixSize: Int32
  • Total downloaded file bytes. Should be used only for calculating download progress. The actual file size may be bigger, and some parts of it may contain garbage

    Declaration

    Swift

    public let downloadedSize: Int32
  • Represents a local file

    Declaration

    Swift

    public init(path: String, canBeDownloaded: Bool, canBeDeleted: Bool, isDownloadingActive: Bool, isDownloadingCompleted: Bool, downloadOffset: Int32, downloadedPrefixSize: Int32, downloadedSize: Int32)

    Parameters

    path

    Local path to the locally available file part; may be empty

    canBeDownloaded

    True, if it is possible to try to download or generate the file

    canBeDeleted

    True, if the file can be deleted

    isDownloadingActive

    True, if the file is currently being downloaded (or a local copy is being generated by some other means)

    isDownloadingCompleted

    True, if the local copy is fully available

    downloadOffset

    Download will be started from this offset. downloaded_prefix_size is calculated from this offset

    downloadedPrefixSize

    If is_downloading_completed is false, then only some prefix of the file starting from download_offset is ready to be read. downloaded_prefix_size is the size of that prefix

    downloadedSize

    Total downloaded file bytes. Should be used only for calculating download progress. The actual file size may be bigger, and some parts of it may contain garbage