Options
All
  • Public
  • Public/Protected
  • All
Menu

Class OpenOptions

Describes how an AsyncFile should be opened.

Hierarchy

  • OpenOptions

Index

Constructors

constructor

  • Returns OpenOptions

  • Parameters

    Returns OpenOptions

Methods

getPerms

  • getPerms(): string
  • Set the permissions string

    Returns string

isAppend

  • isAppend(): boolean
  • Whether the file should be opened in append mode. Defaults to false.

    Returns boolean

isCreate

  • isCreate(): boolean
  • Set whether the file should be created if it does not already exist.

    Returns boolean

isCreateNew

  • isCreateNew(): boolean
  • Set whether the file should be created and fail if it does exist already.

    Returns boolean

isDeleteOnClose

  • isDeleteOnClose(): boolean
  • Set whether the file should be deleted when it's closed, or the JVM is shutdown.

    Returns boolean

isDsync

  • isDsync(): boolean
  • Set whether every write to the file's content will be written synchronously to the underlying hardware.

    Returns boolean

isRead

  • isRead(): boolean
  • Set whether the file is to be opened for reading

    Returns boolean

isSparse

  • isSparse(): boolean
  • Set whether a hint should be provided that the file to created is sparse

    Returns boolean

isSync

  • isSync(): boolean
  • Set whether every write to the file's content and meta-data will be written synchronously to the underlying hardware.

    Returns boolean

isTruncateExisting

  • isTruncateExisting(): boolean
  • Set whether the file should be truncated to zero length on opening if it exists and is opened for write

    Returns boolean

isWrite

  • isWrite(): boolean
  • Set whether the file is to be opened for writing

    Returns boolean

setAppend

  • Whether the file should be opened in append mode. Defaults to false.

    Parameters

    • append: boolean

    Returns OpenOptions

setCreate

  • Set whether the file should be created if it does not already exist.

    Parameters

    • create: boolean

    Returns OpenOptions

setCreateNew

  • Set whether the file should be created and fail if it does exist already.

    Parameters

    • createNew: boolean

    Returns OpenOptions

setDeleteOnClose

  • setDeleteOnClose(deleteOnClose: boolean): OpenOptions
  • Set whether the file should be deleted when it's closed, or the JVM is shutdown.

    Parameters

    • deleteOnClose: boolean

    Returns OpenOptions

setDsync

  • Set whether every write to the file's content will be written synchronously to the underlying hardware.

    Parameters

    • dsync: boolean

    Returns OpenOptions

setPerms

  • Set the permissions string

    Parameters

    • perms: string

    Returns OpenOptions

setRead

  • Set whether the file is to be opened for reading

    Parameters

    • read: boolean

    Returns OpenOptions

setSparse

  • Set whether a hint should be provided that the file to created is sparse

    Parameters

    • sparse: boolean

    Returns OpenOptions

setSync

  • Set whether every write to the file's content and meta-data will be written synchronously to the underlying hardware.

    Parameters

    • sync: boolean

    Returns OpenOptions

setTruncateExisting

  • setTruncateExisting(truncateExisting: boolean): OpenOptions
  • Set whether the file should be truncated to zero length on opening if it exists and is opened for write

    Parameters

    • truncateExisting: boolean

    Returns OpenOptions

setWrite

  • Set whether the file is to be opened for writing

    Parameters

    • write: boolean

    Returns OpenOptions

Generated using TypeDoc