OpenOptions
이 콘텐츠는 아직 번역되지 않았습니다.
Module @netwiv/api/plugins/fs · Kind Interface
import { OpenOptions } from '@netwiv/api/plugins/fs';Members
Section titled “Members”append?
Section titled “append?”append?: boolean | undefinedSets 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 }.
baseDir?
Section titled “baseDir?”baseDir?: BaseDirectory | undefinedBase directory for path
create?
Section titled “create?”create?: boolean | undefinedSets 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.
createNew?
Section titled “createNew?”createNew?: boolean | undefinedDefaults 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.
mode?: number | undefinedPermissions to use if creating the file (defaults to 0o666, before
the process’s umask).
Ignored on Windows.
read?: boolean | undefinedSets the option for read access. This option, when true, means that the
file should be read-able if opened.
truncate?
Section titled “truncate?”truncate?: boolean | undefinedSets 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.
write?
Section titled “write?”write?: boolean | undefinedSets 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.
Upstream since 2.0.0
Descriptions come from the pinned @tauri-apps/plugin-fs@2.5.2 declarations (MIT OR Apache-2.0); imports are shown with @netwiv/api paths.