constants - Node documentation
namespace constants

Usage in Deno

import { constants } from "node:fs";

Variables

v
constants.COPYFILE_EXCL

Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists.

v
constants.COPYFILE_FICLONE

Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink. If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used.

v
constants.COPYFILE_FICLONE_FORCE

Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink. If the underlying platform does not support copy-on-write, then the operation will fail with an error.

v
constants.F_OK

Constant for fs.access(). File is visible to the calling process.

v
constants.O_APPEND

Constant for fs.open(). Flag indicating that data will be appended to the end of the file.

v
constants.O_CREAT

Constant for fs.open(). Flag indicating to create the file if it does not already exist.

v
constants.O_DIRECT

Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O.

v
constants.O_DIRECTORY

Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory.

v
constants.O_DSYNC

Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity.

v
constants.O_EXCL

Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists.

v
constants.O_NOATIME

constant for fs.open(). Flag indicating reading accesses to the file system will no longer result in an update to the atime information associated with the file. This flag is available on Linux operating systems only.

v
constants.O_NOCTTY

Constant for fs.open(). Flag indicating that if path identifies a terminal device, opening the path shall not cause that terminal to become the controlling terminal for the process (if the process does not already have one).

v
constants.O_NOFOLLOW

Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link.

v
constants.O_NONBLOCK

Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible.

v
constants.O_RDONLY

Constant for fs.open(). Flag indicating to open a file for read-only access.

v
constants.O_RDWR

Constant for fs.open(). Flag indicating to open a file for read-write access.

v
constants.O_SYNC

Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O.

v
constants.O_TRUNC

Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero.

v
constants.O_WRONLY

Constant for fs.open(). Flag indicating to open a file for write-only access.

v
constants.R_OK

Constant for fs.access(). File can be read by the calling process.

v
constants.S_IFBLK

Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file.

v
constants.S_IFCHR

Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file.

v
constants.S_IFDIR

Constant for fs.Stats mode property for determining a file's type. File type constant for a directory.

v
constants.S_IFIFO

Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe.

v
constants.S_IFLNK

Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link.

v
constants.S_IFMT

Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code.

v
constants.S_IFREG

Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file.

v
constants.S_IFSOCK

Constant for fs.Stats mode property for determining a file's type. File type constant for a socket.

v
constants.S_IRGRP

Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group.

v
constants.S_IROTH

Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others.

v
constants.S_IRUSR

Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner.

v
constants.S_IRWXG

Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group.

v
constants.S_IRWXO

Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others.

v
constants.S_IRWXU

Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner.

v
constants.S_IWGRP

Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group.

v
constants.S_IWOTH

Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others.

v
constants.S_IWUSR

Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner.

v
constants.S_IXGRP

Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group.

v
constants.S_IXOTH

Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others.

v
constants.S_IXUSR

Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner.

v
constants.UV_FS_O_FILEMAP

When set, a memory file mapping is used to access the file. This flag is available on Windows operating systems only. On other operating systems, this flag is ignored.

v
constants.W_OK

Constant for fs.access(). File can be written by the calling process.

v
constants.X_OK

Constant for fs.access(). File can be executed by the calling process.