Skip to content
File

Blob: src/node/internal/internal_fs_constants.ts

typescript84 lines
1// Copyright (c) 2017-2022 Cloudflare, Inc.
2// Licensed under the Apache 2.0 license found in the LICENSE file or at:
3// https://opensource.org/licenses/Apache-2.0
4//
5// Copyright Joyent, Inc. and other Node contributors.
6//
7// Permission is hereby granted, free of charge, to any person obtaining a
8// copy of this software and associated documentation files (the
9// "Software"), to deal in the Software without restriction, including
10// without limitation the rights to use, copy, modify, merge, publish,
11// distribute, sublicense, and/or sell copies of the Software, and to permit
12// persons to whom the Software is furnished to do so, subject to the
13// following conditions:
14//
15// The above copyright notice and this permission notice shall be included
16// in all copies or substantial portions of the Software.
17//
18// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
21// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
22// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
23// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
24// USE OR OTHER DEALINGS IN THE SOFTWARE.
25 
26export const UV_FS_SYMLINK_DIR = 1;
27export const UV_FS_SYMLINK_JUNCTION = 2;
28export const O_RDONLY = 0;
29export const O_WRONLY = 1;
30export const O_RDWR = 2;
31export const UV_DIRENT_UNKNOWN = 0;
32export const UV_DIRENT_FILE = 1;
33export const UV_DIRENT_DIR = 2;
34export const UV_DIRENT_LINK = 3;
35export const UV_DIRENT_FIFO = 4;
36export const UV_DIRENT_SOCKET = 5;
37export const UV_DIRENT_CHAR = 6;
38export const UV_DIRENT_BLOCK = 7;
39export const EXTENSIONLESS_FORMAT_JAVASCRIPT = 0;
40export const EXTENSIONLESS_FORMAT_WASM = 1;
41export const S_IFMT = 61440;
42export const S_IFREG = 32768;
43export const S_IFDIR = 16384;
44export const S_IFCHR = 8192;
45export const S_IFBLK = 24576;
46export const S_IFIFO = 4096;
47export const S_IFLNK = 40960;
48export const S_IFSOCK = 49152;
49export const O_CREAT = 64;
50export const O_EXCL = 128;
51export const UV_FS_O_FILEMAP = 0;
52export const O_NOCTTY = 256;
53export const O_TRUNC = 512;
54export const O_APPEND = 1024;
55export const O_DIRECTORY = 65536;
56export const O_NOATIME = 262144;
57export const O_NOFOLLOW = 131072;
58export const O_SYNC = 1052672;
59export const O_DSYNC = 4096;
60export const O_DIRECT = 16384;
61export const O_NONBLOCK = 2048;
62export const S_IRWXU = 448;
63export const S_IRUSR = 256;
64export const S_IWUSR = 128;
65export const S_IXUSR = 64;
66export const S_IRWXG = 56;
67export const S_IRGRP = 32;
68export const S_IWGRP = 16;
69export const S_IXGRP = 8;
70export const S_IRWXO = 7;
71export const S_IROTH = 4;
72export const S_IWOTH = 2;
73export const S_IXOTH = 1;
74export const F_OK = 0;
75export const R_OK = 4;
76export const W_OK = 2;
77export const X_OK = 1;
78export const UV_FS_COPYFILE_EXCL = 1;
79export const COPYFILE_EXCL = UV_FS_COPYFILE_EXCL;
80export const UV_FS_COPYFILE_FICLONE = 2;
81export const COPYFILE_FICLONE = UV_FS_COPYFILE_FICLONE;
82export const UV_FS_COPYFILE_FICLONE_FORCE = 4;
83export const COPYFILE_FICLONE_FORCE = UV_FS_COPYFILE_FICLONE_FORCE;