mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 15:06:54 -05:00
docs(fs): add default info of OpenOptions
(#16104)
This commit is contained in:
parent
d13c88e70d
commit
a4a628dc6f
1 changed files with 5 additions and 5 deletions
10
cli/dts/lib.deno.ns.d.ts
vendored
10
cli/dts/lib.deno.ns.d.ts
vendored
|
@ -1975,27 +1975,27 @@ declare namespace Deno {
|
||||||
*
|
*
|
||||||
* @category File System */
|
* @category File System */
|
||||||
export interface OpenOptions {
|
export interface OpenOptions {
|
||||||
/** Sets the option for read access. This option, when `true`, means that
|
/** Defaults to `true`. Sets the option for read access. This option, when `true`, means that
|
||||||
* the file should be read-able if opened. */
|
* the file should be read-able if opened. */
|
||||||
read?: boolean;
|
read?: boolean;
|
||||||
/** Sets the option for write access. This option, when `true`, means that
|
/** Defaults to `false`. 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,
|
* 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
|
* any write calls on it will overwrite its contents, by default without
|
||||||
* truncating it. */
|
* truncating it. */
|
||||||
write?: boolean;
|
write?: boolean;
|
||||||
/** Sets the option for the append mode. This option, when `true`, means
|
/** Defaults to `false`. Sets the option for the append mode. This option, when `true`, means
|
||||||
* that writes will append to a file instead of overwriting previous
|
* that writes will append to a file instead of overwriting previous
|
||||||
* contents.
|
* contents.
|
||||||
*
|
*
|
||||||
* Note that setting `{ write: true, append: true }` has the same effect as
|
* Note that setting `{ write: true, append: true }` has the same effect as
|
||||||
* setting only `{ append: true }`. */
|
* setting only `{ append: true }`. */
|
||||||
append?: boolean;
|
append?: boolean;
|
||||||
/** Sets the option for truncating a previous file. If a file is
|
/** Defaults to `false`. 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`
|
* 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
|
* size if it already exists. The file must be opened with write access
|
||||||
* for truncate to work. */
|
* for truncate to work. */
|
||||||
truncate?: boolean;
|
truncate?: boolean;
|
||||||
/** Sets the option to allow creating a new file, if one doesn't already
|
/** Defaults to `false`. 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
|
* exist at the specified path. Requires write or append access to be
|
||||||
* used. */
|
* used. */
|
||||||
create?: boolean;
|
create?: boolean;
|
||||||
|
|
Loading…
Reference in a new issue