Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/docxml/src/classes/BinaryFile.ts>BinaryFile

An experimental Deno tool to transform XML to DOCX with a little XPath- and component based configuration
Go to Latest
class BinaryFile
import { BinaryFile } from "https://deno.land/x/docxml@2.0.1/src/classes/BinaryFile.ts";

Constructors

new
protected
BinaryFile(location: string, reader: BinaryFileReader)

Properties

private
readonly
reader: BinaryFileReader
readonly
contentType: ContentType
readonly
location: string

Methods

Get all XmlFile instances related to this one, including self. This helps the system serialize itself back to DOCX fullly.

By default only returns the instance itself but no other related instances.

deprecated
isEmpty()

Let a file tell the system when it is effectively empty, so it can be omitted from the archive.

toArchive(archive: ZipArchive): void

Add all related files to the given archive.

toUint8Array(): Promise<Uint8Array>

Static Methods

fromArchive(archive: ZipArchive, location: string): BinaryFile
fromData(data: Uint8Array | Promise<Uint8Array>, location: string): BinaryFile
fromDisk(diskLocation: string, location: string): BinaryFile