Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • OpenOptions

Index

Properties

Optional append

append: boolean

Sets the option for the append mode. This option, when true, means that writes will append to a file instead of overwriting previous contents. Note that setting { write: true, append: true } has the same effect as setting only { append: true }.

Optional create

create: boolean

Sets the option to allow creating a new file, if one doesn't already exist at the specified path. Requires write or append access to be used.

Optional createNew

createNew: boolean

Defaults to false. If set to true, no file, directory, or symlink is allowed to exist at the target location. Requires write or append access to be used. When createNew is set to true, create and truncate are ignored.

Optional mode

mode: number

Permissions to use if creating the file (defaults to 0o666, before the process's umask). Ignored on Windows.

Optional read

read: boolean

Sets the option for read access. This option, when true, means that the file should be read-able if opened.

Optional truncate

truncate: boolean

Sets the option for truncating a previous file. If a file is successfully opened with this option set it will truncate the file to 0 size if it already exists. The file must be opened with write access for truncate to work.

Optional write

write: boolean

Sets the option for write access. This option, when true, means that the file should be write-able if opened. If the file already exists, any write calls on it will overwrite its contents, by default without truncating it.

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc