SerenityJS
    Preparing search index...
    Index

    Constructors

    Properties

    fileTree: FileMap<Buffer<ArrayBufferLike> | FileMap>

    The file contents of the resource pack.

    The manifest of the resource pack.

    path: string

    The path to the main directory of the resource pack.

    packInformation: string = "This resource pack was downloaded from a SerenityJS server.\nFor more information, visit https://serenityjs.net"

    The information about the resource pack.

    Accessors

    Methods

    • Get the chunk data for a specific index.

      Parameters

      • index: number

        The index of the chunk.

      • maxChunkSize: number

        The maximum size of a chunk in bytes.

      Returns Buffer

      The chunk data as a Buffer.

    • Get the amount of chunks that need to be sent to the client for this pack.

      Parameters

      • maxChunkSize: number

        The maximum size of a chunk in bytes.

      Returns number

      The number of chunks.

    • Get a file from the resource pack.

      Parameters

      • path: string

        The path to the file.

      Returns Buffer

      The file contents as a Buffer.

    • Set a file in the resource pack.

      Parameters

      • path: string

        The path to the file.

      • data: Buffer

        The file contents as a Buffer.

      Returns void