Options
All
  • Public
  • Public/Protected
  • All
Menu

General utilities

Index

Functions

Const Throw

  • Throw(e: string | Error): never
  • like 'throw', but a function rather than a statement.

    Parameters

    • e: string | Error

      The exception or string to be thrown.

    Returns never

Const asFiles

  • A type checker that verifies the argument is a file array, not a directory tree. Throws an error if given something else

    Parameters

    • Optional t: Files | Tree

      A tree or a file array

    Returns null | Files

    A file array or null if the argument was undefined

Const asTree

  • A type checker that verifies the argument is a tree, not a file array. Throws an error if given something else.

    Parameters

    • Optional t: Files | Tree

      A tree or a file array

    Returns null | Tree

    Tree or null if the argument was undefined.

Const deleteVersion

  • Delete a specific version from a Files array. This is an internal tool for implementing FILE handlers

    Parameters

    • files: Files

      The Files array

    • version: Version

      The version to delete. Either a version number or a label. The special label '*' deletes all versions.

    Returns void

    void

dsv

  • dsv(data: string, delimiter: "\t" | ",", __namedParameters?: DataOptions): object[]
  • Parameters

    • data: string

      The data to be parsed

    • delimiter: "\t" | ","

      The field delimiter, either "\t" or ",".

    • __namedParameters: DataOptions = ...

    Returns object[]

Const encodeString16

  • encodeString16(s: string): ArrayBuffer
  • Encode a string into an ArrayBuffer.

    Parameters

    • s: string

      The string to be encoded

    Returns ArrayBuffer

    An ArrayBuffer with the string data as UTF-16

Const getVersion

  • Add a file at a specific version or label in a Files array. This is an internal tool for implementing FILE handlers.

    Parameters

    • files: Files

      The Files array

    • version: Version

      The version to delete. Either a version number or a label

    Returns null | VFile

    void

Const isFileAttachment

Const isFiles

  • A type guard to distinguish directory trees and file arrays.

    Parameters

    • Optional t: Files | Tree

      The object, which should be a directory tree or a files array

    Returns t is Files

    true if the argument is a Files array

Const isTree

  • A type guard to distinguish directory trees and file arrays.

    Parameters

    • Optional t: Files | Tree

      The object, which should be a directory tree or a files array

    Returns t is Tree

    true if the argument is a Tree

Const meta

  • meta<T>(obj: T, metadata: Metadata): any
  • Associate a metadata object with the specified file (or array of file versions). This is normally used to annotate entries in the AFileSystem tree.

    Type parameters

    • T

    Parameters

    Returns any

Const setVersion

  • Add a file at a specific version or label in a Files array. This is an internal tool for implementing FILE handlers.

    Parameters

    Returns void

    void

Const toArrayBuffer

  • toArrayBuffer(s: string, __namedParameters?: DataOptions): ArrayBufferLike

Generated using TypeDoc