Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a single CF-Core file for a specific mod.

Hierarchy

  • CFObject
    • ModFile

Index

Constructors

Properties

alternateFileId: number
dependencies: FileDependency[]
displayName: string
downloadCount: bigint
downloadUrl: string
exposeAsAlternative: boolean
fileDate: Date
fileFingerprint: bigint
fileLength: bigint
fileName: string
fileStatus: FileStatus
gameId: number
gameVersions: string[]
hashes: FileHash[]
id: number
isAvailable: boolean
isServerPack: boolean
modId: number
modules: FileModule[]
parentProjectFileId: number
releaseType: FileReleaseType
serverPackFileId: number
sortableGameVersions: SortableGameVersion[]

Methods

  • download(path: PathLike, verify?: boolean): Promise<boolean>
  • Download this ModFile.

    Parameters

    • path: PathLike

      The path where the file should be saved.

    • verify: boolean = true

      Should the downloaded files hash be checked?

    Returns Promise<boolean>

    the Promise resolves with true if download was successful and the hash fits (if verify is true.) returns false otherwise.

  • get_changelog(): Promise<string>
  • Get the changelog for this specific [[ModFile.]]

    Returns Promise<string>

    The changelog in html.

  • Parameters

    • relations: FileRelationType[] = ...

      The types to get. This is a filter list to make sure that only requested dependencies are downloaded.

    Returns Promise<ModFile[]>

    a list of ModFile which got found as dependencies. Can be an empty array.

  • get_mod(): Promise<Mod>

Generated using TypeDoc