W-CF Documentation - v11.0.0
    Preparing search index...

    Implements

    Index
    compressionLevel: number

    Level of compression, 0 means no compression. (range: [0, 9])

    • Adds a binary or text file to the container.

      Parameters

      • pData: string | ArrayBuffer | Blob

        The data of the file.

      • pFilename: string

        Name of the file to add. May include a path. e.g. "textures/123.jpg". Has to be lowercase.

      • OptionalpCompress: boolean

        If true the file should be compressed (if supported by the implementation) otherwise the file should not be compressed. (Default: true)

      • OptionalpCacheable: boolean

        If true the file may be cached. The filename should be used as cache id in this case. (Default: false)

      Returns Promise<void>

    • Adds an already cached file to the container. True should be returned if the file was added, otherwise false (e.g. if the file was not found inside the cache).

      Parameters

      • pFilename: string

        Name of the file to add. May include a path. e.g. "textures/123.jpg". Has to be lowercase.

      • OptionalpCompress: boolean

        If true the file should be compressed (if supported by the implementation) otherwise the file should not be compressed. (Default: true)

      Returns Promise<boolean>

    • Adds a binary or text file to the container using an url.

      Parameters

      • pUrl: string

        The file url.

      • pFilename: string

        Name of the file to add. May include a path. e.g. "textures/123.jpg". Has to be lowercase.

      • pBinary: boolean

        If true the file containes binary data.

      • OptionalpCompress: boolean

        If true the file should be compressed (if supported by the implementation) otherwise the file should not be compressed. (Default: true)

      • OptionalpCacheable: boolean

        If true the file may be cached. The filename should be used as cache id in this case. (Default: false)

      Returns Promise<void>

    • Retrieves a binary or text file from the container. If the file doesn't exist the promise has to be rejected with an FileNotFoundError.

      Parameters

      • pFilename: string

        Name of the file. May include a path. e.g. "textures/123.jpg".

      • pBinary: false

        If true the file containes binary data and is returned as ArrayBuffer otherwise as string.

      Returns Promise<string>

    • Parameters

      • pFilename: string
      • pBinary: true

      Returns Promise<ArrayBuffer>

    • Returns a list of files which are part of the given folder and its sub folders. The files are returned as a relative path including the file name. If the folder doesn't exist the promise has to be rejected with an FileNotFoundError.

      Parameters

      • OptionalpFolderPath: string

        Path of the folder.

      Returns Promise<string[]>