hedit/format

Set of functions to define file formats.

Classes

Format

Methods

static registerFormat(name, guessopt, desc)

Registers a new file format.

Parameters:
Name Type Attributes Description
name string

Name of the format. Must be unique.

guess object <optional>

Hint for automatic selection of format on file open.

Properties
Name Type Description
extension string

Use this format for the files matching this extension.

magic string

Use this format for the files starting with the given magic.

desc object

Description of the file format.

Throws:

Throws if the name of the format is not unique or if the format description is invalid.