OpenOptions class

Options which can be set when doing {@linkcode Deno.open} and {@linkcode Deno.openSync}.

Available extensions
Annotations
  • @JS()
  • @staticInterop
  • @anonymous

Constructors

OpenOptions({bool? read, bool? write, bool? append, bool? truncate, bool? create, bool? createNew, num? mode})
factory

Properties

append bool?

Available on OpenOptions, provided by the OpenOptions$Typings extension

Sets the option for the append mode. This option, when true, means that writes will append to a file instead of overwriting previous contents.
getter/setter pair
create bool?

Available on OpenOptions, provided by the OpenOptions$Typings extension

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.
getter/setter pair
createNew bool?

Available on OpenOptions, provided by the OpenOptions$Typings extension

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.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
mode num?

Available on OpenOptions, provided by the OpenOptions$Typings extension

Permissions to use if creating the file (defaults to 0o666, before the process's umask).
getter/setter pair
read bool?

Available on OpenOptions, provided by the OpenOptions$Typings extension

Sets the option for read access. This option, when true, means that the file should be read-able if opened.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
truncate bool?

Available on OpenOptions, provided by the OpenOptions$Typings extension

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.
getter/setter pair
write bool?

Available on OpenOptions, provided by the OpenOptions$Typings extension

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.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited