File
Blob: src/node/internal/internal_fs_constants.ts
| 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 | |
| 26 | export const UV_FS_SYMLINK_DIR = 1; |
| 27 | export const UV_FS_SYMLINK_JUNCTION = 2; |
| 28 | export const O_RDONLY = 0; |
| 29 | export const O_WRONLY = 1; |
| 30 | export const O_RDWR = 2; |
| 31 | export const UV_DIRENT_UNKNOWN = 0; |
| 32 | export const UV_DIRENT_FILE = 1; |
| 33 | export const UV_DIRENT_DIR = 2; |
| 34 | export const UV_DIRENT_LINK = 3; |
| 35 | export const UV_DIRENT_FIFO = 4; |
| 36 | export const UV_DIRENT_SOCKET = 5; |
| 37 | export const UV_DIRENT_CHAR = 6; |
| 38 | export const UV_DIRENT_BLOCK = 7; |
| 39 | export const EXTENSIONLESS_FORMAT_JAVASCRIPT = 0; |
| 40 | export const EXTENSIONLESS_FORMAT_WASM = 1; |
| 41 | export const S_IFMT = 61440; |
| 42 | export const S_IFREG = 32768; |
| 43 | export const S_IFDIR = 16384; |
| 44 | export const S_IFCHR = 8192; |
| 45 | export const S_IFBLK = 24576; |
| 46 | export const S_IFIFO = 4096; |
| 47 | export const S_IFLNK = 40960; |
| 48 | export const S_IFSOCK = 49152; |
| 49 | export const O_CREAT = 64; |
| 50 | export const O_EXCL = 128; |
| 51 | export const UV_FS_O_FILEMAP = 0; |
| 52 | export const O_NOCTTY = 256; |
| 53 | export const O_TRUNC = 512; |
| 54 | export const O_APPEND = 1024; |
| 55 | export const O_DIRECTORY = 65536; |
| 56 | export const O_NOATIME = 262144; |
| 57 | export const O_NOFOLLOW = 131072; |
| 58 | export const O_SYNC = 1052672; |
| 59 | export const O_DSYNC = 4096; |
| 60 | export const O_DIRECT = 16384; |
| 61 | export const O_NONBLOCK = 2048; |
| 62 | export const S_IRWXU = 448; |
| 63 | export const S_IRUSR = 256; |
| 64 | export const S_IWUSR = 128; |
| 65 | export const S_IXUSR = 64; |
| 66 | export const S_IRWXG = 56; |
| 67 | export const S_IRGRP = 32; |
| 68 | export const S_IWGRP = 16; |
| 69 | export const S_IXGRP = 8; |
| 70 | export const S_IRWXO = 7; |
| 71 | export const S_IROTH = 4; |
| 72 | export const S_IWOTH = 2; |
| 73 | export const S_IXOTH = 1; |
| 74 | export const F_OK = 0; |
| 75 | export const R_OK = 4; |
| 76 | export const W_OK = 2; |
| 77 | export const X_OK = 1; |
| 78 | export const UV_FS_COPYFILE_EXCL = 1; |
| 79 | export const COPYFILE_EXCL = UV_FS_COPYFILE_EXCL; |
| 80 | export const UV_FS_COPYFILE_FICLONE = 2; |
| 81 | export const COPYFILE_FICLONE = UV_FS_COPYFILE_FICLONE; |
| 82 | export const UV_FS_COPYFILE_FICLONE_FORCE = 4; |
| 83 | export const COPYFILE_FICLONE_FORCE = UV_FS_COPYFILE_FICLONE_FORCE; |