39 #include <sys/types.h>
40 #include <sys/socket.h>
49 #if defined(__DragonFly__) || \
50 defined(__FreeBSD__) || \
51 defined(__FreeBSD_kernel__) || \
52 defined(__OpenBSD__) || \
54 # define HAVE_PREADV 1
56 # define HAVE_PREADV 0
59 #if defined(__linux__) || defined(__sun)
60 # include <sys/sendfile.h>
63 #if defined(__APPLE__)
64 # include <sys/sysctl.h>
65 #elif defined(__linux__) && !defined(FICLONE)
66 # include <sys/ioctl.h>
67 # define FICLONE _IOW(0x94, 9, int)
70 #if defined(_AIX) && !defined(_AIX71)
74 #if defined(__APPLE__) || \
75 defined(__DragonFly__) || \
76 defined(__FreeBSD__) || \
77 defined(__FreeBSD_kernel__) || \
78 defined(__OpenBSD__) || \
80 # include <sys/param.h>
81 # include <sys/mount.h>
82 #elif defined(__sun) || \
84 defined(__NetBSD__) || \
85 defined(__HAIKU__) || \
87 # include <sys/statvfs.h>
89 # include <sys/statfs.h>
92 #if defined(_AIX) && _XOPEN_SOURCE <= 600
93 extern char *
mkdtemp(
char *
template);
96 #define INIT(subtype) \
100 UV_REQ_INIT(req, UV_FS); \
101 req->fs_type = UV_FS_ ## subtype; \
106 req->new_path = NULL; \
114 assert(path != NULL); \
118 req->path = uv__strdup(path); \
119 if (req->path == NULL) \
129 req->new_path = new_path; \
132 size_t new_path_len; \
133 path_len = strlen(path) + 1; \
134 new_path_len = strlen(new_path) + 1; \
135 req->path = uv__malloc(path_len + new_path_len); \
136 if (req->path == NULL) \
138 req->new_path = req->path + path_len; \
139 memcpy((void*) req->path, path, path_len); \
140 memcpy((void*) req->new_path, new_path, new_path_len); \
148 uv__req_register(loop, req); \
149 uv__work_submit(loop, \
157 uv__fs_work(&req->work_req); \
158 return req->result; \
177 #if defined(__APPLE__)
201 #if defined(__linux__) || defined(__sun) || defined(__NetBSD__)
203 #elif defined(__APPLE__)
227 #if defined(__linux__) \
229 || defined(__HAIKU__)
234 ts[0] = uv__fs_to_timespec(
req->atime);
235 ts[1] = uv__fs_to_timespec(
req->mtime);
236 return futimens(
req->file, ts);
237 #elif defined(__APPLE__) \
238 || defined(__DragonFly__) \
239 || defined(__FreeBSD__) \
240 || defined(__FreeBSD_kernel__) \
241 || defined(__NetBSD__) \
242 || defined(__OpenBSD__) \
245 tv[0] = uv__fs_to_timeval(
req->atime);
246 tv[1] = uv__fs_to_timeval(
req->mtime);
250 return futimes(
req->file,
tv);
252 #elif defined(__MVS__)
254 memset(&atr, 0,
sizeof(atr));
255 atr.att_mtimechg = 1;
256 atr.att_atimechg = 1;
257 atr.att_mtime =
req->mtime;
258 atr.att_atime =
req->atime;
259 return __fchattr(
req->file, &atr,
sizeof(atr));
295 static int no_cloexec_support;
297 static const char pattern[] =
"XXXXXX";
298 static const size_t pattern_size =
sizeof(pattern) - 1;
303 path_length = strlen(
path);
310 if (path_length < pattern_size ||
311 strcmp(
path + path_length - pattern_size, pattern)) {
412 while (rc == -1 && errno ==
EINTR);
417 if (rc == -1 && result == 0)
442 #if defined(__linux__)
443 static int no_preadv;
449 if (
req->nbufs > iovmax)
454 result =
read(
req->file,
req->bufs[0].base,
req->bufs[0].len);
458 if (
req->nbufs == 1) {
466 # if defined(__linux__)
472 # if defined(__linux__)
478 if (result == -1 && errno == ENOSYS) {
489 if (
req->bufs !=
req->bufsml)
511 #if defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_8)
512 #define UV_CONST_DIRENT uv__dirent_t
514 #define UV_CONST_DIRENT const uv__dirent_t
519 return strcmp(dent->d_name,
".") != 0 && strcmp(dent->d_name,
"..") != 0;
524 return strcmp((*a)->d_name, (*b)->d_name);
544 }
else if (
n == -1) {
560 dir->dir = opendir(
req->path);
561 if (dir->dir ==
NULL)
577 unsigned int dirent_idx;
583 while (dirent_idx < dir->nentries) {
595 if (strcmp(res->
d_name,
".") == 0 || strcmp(res->
d_name,
"..") == 0)
611 for (
i = 0;
i < dirent_idx; ++
i) {
624 if (dir->dir !=
NULL) {
636 #if defined(__sun) || \
637 defined(__MVS__) || \
638 defined(__NetBSD__) || \
639 defined(__HAIKU__) || \
643 if (0 != statvfs(
req->path, &
buf))
652 if (stat_fs ==
NULL) {
657 #if defined(__sun) || \
658 defined(__MVS__) || \
659 defined(__OpenBSD__) || \
660 defined(__NetBSD__) || \
661 defined(__HAIKU__) || \
680 pathmax = pathconf(
path, _PC_PATH_MAX);
693 #if defined(_POSIX_PATH_MAX) || defined(PATH_MAX)
699 ret = lstat(
req->path, &st);
702 if (!S_ISLNK(st.st_mode)) {
750 #if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200809L
820 for (nsent = 0; (
size_t) nsent <
len; ) {
831 while (nread == -1 && errno ==
EINTR);
837 if (use_pread && nsent == 0 && (errno ==
EIO || errno ==
ESPIPE)) {
848 for (nwritten = 0; nwritten < nread; ) {
850 n =
write(out_fd,
buf + nwritten, nread - nwritten);
851 while (
n == -1 && errno ==
EINTR);
858 if (errno !=
EAGAIN && errno != EWOULDBLOCK) {
864 pfd.events = POLLOUT;
868 n =
poll(&pfd, 1, -1);
869 while (
n == -1 && errno ==
EINTR);
871 if (
n == -1 || (pfd.revents & ~POLLOUT) != 0) {
897 #if defined(__linux__) || defined(__sun)
906 static int copy_file_range_support = 1;
908 if (copy_file_range_support) {
911 if (
r == -1 && errno == ENOSYS) {
913 copy_file_range_support = 0;
921 r = sendfile(out_fd, in_fd, &
off,
req->bufsml[0].len);
928 if (
r != -1 ||
off >
req->off) {
944 #elif defined(__APPLE__) || \
945 defined(__DragonFly__) || \
946 defined(__FreeBSD__) || \
947 defined(__FreeBSD_kernel__)
957 #if defined(__FreeBSD__) || defined(__DragonFly__)
959 r = sendfile(in_fd, out_fd,
req->off,
req->bufsml[0].len,
NULL, &
len, 0);
960 #elif defined(__FreeBSD_kernel__)
962 r = bsd_sendfile(in_fd,
973 r = sendfile(in_fd, out_fd,
req->off, &
len,
NULL, 0);
1009 #if defined(__linux__) \
1010 || defined(_AIX71) \
1012 || defined(__HAIKU__)
1017 ts[0] = uv__fs_to_timespec(
req->atime);
1018 ts[1] = uv__fs_to_timespec(
req->mtime);
1019 return utimensat(AT_FDCWD,
req->path, ts, 0);
1020 #elif defined(__APPLE__) \
1021 || defined(__DragonFly__) \
1022 || defined(__FreeBSD__) \
1023 || defined(__FreeBSD_kernel__) \
1024 || defined(__NetBSD__) \
1025 || defined(__OpenBSD__)
1027 tv[0] = uv__fs_to_timeval(
req->atime);
1028 tv[1] = uv__fs_to_timeval(
req->mtime);
1029 return utimes(
req->path,
tv);
1030 #elif defined(_AIX) \
1034 buf.modtime =
req->mtime;
1036 #elif defined(__MVS__)
1038 memset(&atr, 0,
sizeof(atr));
1039 atr.att_mtimechg = 1;
1040 atr.att_atimechg = 1;
1041 atr.att_mtime =
req->mtime;
1042 atr.att_atime =
req->atime;
1043 return __lchattr((
char*)
req->path, &atr,
sizeof(atr));
1052 #if defined(__linux__) || \
1053 defined(_AIX71) || \
1057 ts[0] = uv__fs_to_timespec(
req->atime);
1058 ts[1] = uv__fs_to_timespec(
req->mtime);
1059 return utimensat(AT_FDCWD,
req->path, ts, AT_SYMLINK_NOFOLLOW);
1060 #elif defined(__APPLE__) || \
1061 defined(__DragonFly__) || \
1062 defined(__FreeBSD__) || \
1063 defined(__FreeBSD_kernel__) || \
1066 tv[0] = uv__fs_to_timeval(
req->atime);
1067 tv[1] = uv__fs_to_timeval(
req->mtime);
1068 return lutimes(
req->path,
tv);
1077 #if defined(__linux__)
1078 static int no_pwritev;
1086 #if defined(__APPLE__)
1087 static pthread_mutex_t
lock = PTHREAD_MUTEX_INITIALIZER;
1089 if (pthread_mutex_lock(&
lock))
1094 if (
req->nbufs == 1)
1099 if (
req->nbufs == 1) {
1100 r = pwrite(
req->file,
req->bufs[0].base,
req->bufs[0].len,
req->off);
1106 # if defined(__linux__)
1107 if (no_pwritev) retry:
1110 r = pwrite(
req->file,
req->bufs[0].base,
req->bufs[0].len,
req->off);
1112 # if defined(__linux__)
1118 if (
r == -1 && errno == ENOSYS) {
1128 #if defined(__APPLE__)
1129 if (pthread_mutex_unlock(&
lock))
1140 struct stat src_statsbuf;
1141 struct stat dst_statsbuf;
1145 off_t bytes_to_send;
1147 off_t bytes_written;
1161 if (
fstat(srcfd, &src_statsbuf)) {
1176 src_statsbuf.st_mode,
1189 if (
fstat(dstfd, &dst_statsbuf)) {
1195 if (src_statsbuf.st_dev == dst_statsbuf.st_dev &&
1196 src_statsbuf.st_ino == dst_statsbuf.st_ino) {
1207 if (
fchmod(dstfd, src_statsbuf.st_mode) == -1) {
1210 if (
err != UV_EPERM)
1223 if (
s.f_type != 0xFF534D42u)
1236 if (
ioctl(dstfd, FICLONE, srcfd) == 0) {
1254 bytes_to_send = src_statsbuf.st_size;
1256 while (bytes_to_send != 0) {
1258 if (bytes_to_send < (
off_t) bytes_chunk)
1259 bytes_chunk = bytes_to_send;
1261 bytes_written = fs_req.
result;
1264 if (bytes_written < 0) {
1265 err = bytes_written;
1269 bytes_to_send -= bytes_written;
1270 in_offset += bytes_written;
1283 if (
err != 0 && result == 0)
1291 if (
err != 0 && result == 0)
1310 dst->st_dev =
src->st_dev;
1311 dst->st_mode =
src->st_mode;
1312 dst->st_nlink =
src->st_nlink;
1313 dst->st_uid =
src->st_uid;
1314 dst->st_gid =
src->st_gid;
1315 dst->st_rdev =
src->st_rdev;
1316 dst->st_ino =
src->st_ino;
1317 dst->st_size =
src->st_size;
1318 dst->st_blksize =
src->st_blksize;
1319 dst->st_blocks =
src->st_blocks;
1321 #if defined(__APPLE__)
1322 dst->st_atim.tv_sec =
src->st_atimespec.tv_sec;
1323 dst->st_atim.tv_nsec =
src->st_atimespec.tv_nsec;
1324 dst->st_mtim.tv_sec =
src->st_mtimespec.tv_sec;
1325 dst->st_mtim.tv_nsec =
src->st_mtimespec.tv_nsec;
1326 dst->st_ctim.tv_sec =
src->st_ctimespec.tv_sec;
1327 dst->st_ctim.tv_nsec =
src->st_ctimespec.tv_nsec;
1328 dst->st_birthtim.tv_sec =
src->st_birthtimespec.tv_sec;
1329 dst->st_birthtim.tv_nsec =
src->st_birthtimespec.tv_nsec;
1330 dst->st_flags =
src->st_flags;
1331 dst->st_gen =
src->st_gen;
1332 #elif defined(__ANDROID__)
1333 dst->st_atim.tv_sec =
src->st_atime;
1334 dst->st_atim.tv_nsec =
src->st_atimensec;
1335 dst->st_mtim.tv_sec =
src->st_mtime;
1336 dst->st_mtim.tv_nsec =
src->st_mtimensec;
1337 dst->st_ctim.tv_sec =
src->st_ctime;
1338 dst->st_ctim.tv_nsec =
src->st_ctimensec;
1339 dst->st_birthtim.tv_sec =
src->st_ctime;
1340 dst->st_birthtim.tv_nsec =
src->st_ctimensec;
1343 #elif !defined(_AIX) && ( \
1344 defined(__DragonFly__) || \
1345 defined(__FreeBSD__) || \
1346 defined(__OpenBSD__) || \
1347 defined(__NetBSD__) || \
1348 defined(_GNU_SOURCE) || \
1349 defined(_BSD_SOURCE) || \
1350 defined(_SVID_SOURCE) || \
1351 defined(_XOPEN_SOURCE) || \
1352 defined(_DEFAULT_SOURCE))
1353 dst->st_atim.tv_sec =
src->st_atim.tv_sec;
1354 dst->st_atim.tv_nsec =
src->st_atim.tv_nsec;
1355 dst->st_mtim.tv_sec =
src->st_mtim.tv_sec;
1356 dst->st_mtim.tv_nsec =
src->st_mtim.tv_nsec;
1357 dst->st_ctim.tv_sec =
src->st_ctim.tv_sec;
1358 dst->st_ctim.tv_nsec =
src->st_ctim.tv_nsec;
1359 # if defined(__FreeBSD__) || \
1361 dst->st_birthtim.tv_sec =
src->st_birthtim.tv_sec;
1362 dst->st_birthtim.tv_nsec =
src->st_birthtim.tv_nsec;
1363 dst->st_flags =
src->st_flags;
1364 dst->st_gen =
src->st_gen;
1366 dst->st_birthtim.tv_sec =
src->st_ctim.tv_sec;
1367 dst->st_birthtim.tv_nsec =
src->st_ctim.tv_nsec;
1372 dst->st_atim.tv_sec =
src->st_atime;
1373 dst->st_atim.tv_nsec = 0;
1374 dst->st_mtim.tv_sec =
src->st_mtime;
1375 dst->st_mtim.tv_nsec = 0;
1376 dst->st_ctim.tv_sec =
src->st_ctime;
1377 dst->st_ctim.tv_nsec = 0;
1378 dst->st_birthtim.tv_sec =
src->st_ctime;
1379 dst->st_birthtim.tv_nsec = 0;
1393 static int no_statx;
1413 flags |= AT_SYMLINK_NOFOLLOW;
1424 if (errno !=
EINVAL && errno !=
EPERM && errno != ENOSYS)
1470 if (ret != UV_ENOSYS)
1486 if (ret != UV_ENOSYS)
1489 ret = lstat(
path, &pbuf);
1502 if (ret != UV_ENOSYS)
1527 unsigned int iovmax;
1540 if (
req->nbufs > iovmax)
1541 req->nbufs = iovmax;
1545 while (result < 0 && errno ==
EINTR);
1558 nbufs -=
req->nbufs;
1584 #define X(type, action) \
1585 case UV_FS_ ## type: \
1589 switch (
req->fs_type) {
1596 X(FCHOWN, fchown(
req->file,
req->uid,
req->gid));
1629 }
while (
r == -1 && errno ==
EINTR && retry_on_eintr);
1639 req->ptr = &
req->statbuf;
1650 if (
status == UV_ECANCELED) {
1652 req->result = UV_ECANCELED;
1814 const char* new_path,
1969 const char* new_path,
1995 req->bufsml[0].len =
len;
2010 const char* new_path,
2093 if (
req->bufs !=
req->bufsml)
2106 const char* new_path,
2133 return -
req->result;
const lzma_allocator const uint8_t size_t uint8_t * out
static static fork const void static count static fd const char const char static newpath const char static path const char path
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence ftruncate
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval tv
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count fchmod
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec req
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void static flags fstatfs
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen rmdir
static static sync static getppid static getegid const char static filename char static len readlink
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset fstat
static static sync static getppid static getegid const char static filename ioctl
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname pread
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags fcntl
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg fsync
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz writev
static static fork const void static count static fd const char const char static newpath const char static path chmod
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem lchown
static static fork const void static count static fd link
RZ_API void Ht_() free(HtName_(Ht) *ht)
return memset(p, 0, total)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc static sig const char static mode static oldfd struct tms static buf static getgid static geteuid const char static filename static arg static mask struct ustat static ubuf static getppid static setsid static egid sigset_t static set struct timeval struct timezone static tz fd_set fd_set fd_set struct timeval static timeout const char char static bufsiz const char static swapflags void static offset const char static length static mode static who statfs
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc static sig mkdir
static static fork const void static count static fd const char const char static newpath char char char static envp time
static const char struct stat static buf struct stat static buf static idle const char static path static fd const char static len const void static prot const char struct module static image struct kernel_sym static table unsigned char static buf static fsuid unsigned struct dirent unsigned static count readv
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds utime
ssize_t uv__pwritev(int fd, const struct iovec *iov, int iovcnt, int64_t offset)
ssize_t uv__preadv(int fd, const struct iovec *iov, int iovcnt, int64_t offset)
ssize_t uv__fs_copy_file_range(int fd_in, ssize_t *off_in, int fd_out, ssize_t *off_out, size_t len, unsigned int flags)
int uv__statx(int dirfd, const char *path, int flags, unsigned int mask, struct uv__statx *statxbuf)
static static fork const void static count static fd const char static mode const char static pathname const char static path const char static dev const char static group static getpid static getuid void void static data static pause access
static const char struct stat static buf struct stat static buf static vhangup int struct rusage static rusage struct sysinfo static info unsigned static __unused struct utsname static buf const char static size const char static name static pid unsigned static persona static fsgid const void static flags const struct iovec static count static fd const void static len static munlockall struct sched_param static p static sched_yield static policy const struct timespec struct timespec static rem uid_t uid_t uid_t static suid poll
static const char struct stat static buf struct stat static buf static vhangup int struct rusage static rusage struct sysinfo static info unsigned static __unused struct utsname static buf const char static size const char static name static pid unsigned static persona static fsgid const void static flags const struct iovec static count fdatasync
static static fork const void static count static fd const char static mode const char static pathname const char static path const char static dev const char static group static getpid static getuid void void static data static pause const char static mode static sync const char const char static newpath const char static pathname unsigned long static filedes void static end_data_segment static handler static getegid char static len static pgid const char static path static newfd static getpgrp static euid const sigset_t static mask const char static len const gid_t static list symlink
static static fork const void static count static fd const char static mode unlink
static static fork const void static count static fd const char static mode const char static pathname const char static path const char static dev const char static group static getpid static getuid void void static data static pause const char static mode static sync const char const char static newpath const char static pathname unsigned long static filedes void static end_data_segment static handler static getegid char static len static pgid const char static path static newfd static getpgrp static euid const sigset_t static mask const char static len const gid_t static list const char const char static newpath const char static library readdir
static const char struct stat static buf struct stat static buf static vhangup int status
static const char struct stat static buf struct stat static buf static vhangup int struct rusage static rusage struct sysinfo static info unsigned static __unused struct utsname static buf const char static size const char static name static pid unsigned static persona static fsgid const void static flags const struct iovec static count static fd const void static len static munlockall struct sched_param static p static sched_yield static policy const struct timespec struct timespec static rem uid_t uid_t uid_t static suid struct pollfd unsigned static timeout chown
static static fork const void static count static fd const char static mode const char static pathname const char static path const char static dev const char static group static getpid static getuid void void static data static pause const char static mode static sync rename
assert(limit<=UINT32_MAX/2)
ssize_t os390_readlink(const char *path, char *buf, size_t len)
int scandir(const char *maindir, struct dirent ***namelist, int(*filter)(const struct dirent *), int(*compar)(const struct dirent **, const struct dirent **))
char * mkdtemp(char *path)
#define container_of(ptr, type, member)
static struct sockaddr static addrlen static backlog const void static flags void flags
struct uv__statx_timestamp stx_mtime
struct uv__statx_timestamp stx_btime
struct uv__statx_timestamp stx_atime
struct uv__statx_timestamp stx_ctime
int uv__close_nocheckstdio(int fd)
int uv__close_nocancel(int fd)
static char bufs[4][128]
Buffers for uint64_to_str() and uint64_to_nicestr()
static void lock(volatile int *lk)
static size_t uv__fs_buf_offset(uv_buf_t *bufs, size_t size)
int uv_fs_fstat(uv_loop_t *loop, uv_fs_t *req, uv_file file, uv_fs_cb cb)
int uv_fs_closedir(uv_loop_t *loop, uv_fs_t *req, uv_dir_t *dir, uv_fs_cb cb)
int uv_fs_scandir(uv_loop_t *loop, uv_fs_t *req, const char *path, int flags, uv_fs_cb cb)
int uv_fs_fchown(uv_loop_t *loop, uv_fs_t *req, uv_file file, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb)
static int(* uv__mkostemp)(char *, int)
static int uv__fs_statfs(uv_fs_t *req)
static ssize_t uv__fs_utime(uv_fs_t *req)
UV_UNUSED(static struct timespec uv__fs_to_timespec(double time))
static ssize_t uv__fs_futime(uv_fs_t *req)
int uv_fs_rename(uv_loop_t *loop, uv_fs_t *req, const char *path, const char *new_path, uv_fs_cb cb)
int uv_fs_access(uv_loop_t *loop, uv_fs_t *req, const char *path, int flags, uv_fs_cb cb)
static int uv__fs_close(int fd)
int uv_fs_close(uv_loop_t *loop, uv_fs_t *req, uv_file file, uv_fs_cb cb)
static int uv__fs_readdir(uv_fs_t *req)
int uv_fs_stat(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_fs_cb cb)
static ssize_t uv__fs_mkdtemp(uv_fs_t *req)
static ssize_t uv__fs_open(uv_fs_t *req)
int uv_fs_ftruncate(uv_loop_t *loop, uv_fs_t *req, uv_file file, int64_t off, uv_fs_cb cb)
static ssize_t uv__fs_preadv(uv_file fd, uv_buf_t *bufs, unsigned int nbufs, off_t off)
static ssize_t uv__fs_readlink(uv_fs_t *req)
static ssize_t uv__fs_fdatasync(uv_fs_t *req)
static ssize_t uv__fs_realpath(uv_fs_t *req)
static ssize_t uv__fs_scandir(uv_fs_t *req)
int uv_fs_open(uv_loop_t *loop, uv_fs_t *req, const char *path, int flags, int mode, uv_fs_cb cb)
static void uv__fs_done(struct uv__work *w, int status)
int uv_fs_utime(uv_loop_t *loop, uv_fs_t *req, const char *path, double atime, double mtime, uv_fs_cb cb)
int uv_fs_opendir(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_fs_cb cb)
static int uv__fs_opendir(uv_fs_t *req)
static int uv__fs_mkstemp(uv_fs_t *req)
static int uv__fs_closedir(uv_fs_t *req)
int uv_fs_mkstemp(uv_loop_t *loop, uv_fs_t *req, const char *tpl, uv_fs_cb cb)
static int uv__fs_fstat(int fd, uv_stat_t *buf)
int uv_fs_futime(uv_loop_t *loop, uv_fs_t *req, uv_file file, double atime, double mtime, uv_fs_cb cb)
int uv_fs_symlink(uv_loop_t *loop, uv_fs_t *req, const char *path, const char *new_path, int flags, uv_fs_cb cb)
static ssize_t uv__fs_write(uv_fs_t *req)
int uv_fs_sendfile(uv_loop_t *loop, uv_fs_t *req, uv_file out_fd, uv_file in_fd, int64_t off, size_t len, uv_fs_cb cb)
int uv_fs_get_system_error(const uv_fs_t *req)
static ssize_t uv__fs_read(uv_fs_t *req)
static int uv__fs_scandir_sort(UV_CONST_DIRENT **a, UV_CONST_DIRENT **b)
int uv_fs_unlink(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_fs_cb cb)
int uv_fs_mkdir(uv_loop_t *loop, uv_fs_t *req, const char *path, int mode, uv_fs_cb cb)
int uv_fs_mkdtemp(uv_loop_t *loop, uv_fs_t *req, const char *tpl, uv_fs_cb cb)
int uv_fs_chown(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb)
static ssize_t uv__fs_sendfile(uv_fs_t *req)
static void uv__to_stat(struct stat *src, uv_stat_t *dst)
static int uv__fs_lstat(const char *path, uv_stat_t *buf)
static ssize_t uv__fs_write_all(uv_fs_t *req)
int uv_fs_copyfile(uv_loop_t *loop, uv_fs_t *req, const char *path, const char *new_path, int flags, uv_fs_cb cb)
int uv_fs_lutime(uv_loop_t *loop, uv_fs_t *req, const char *path, double atime, double mtime, uv_fs_cb cb)
static ssize_t uv__fs_lutime(uv_fs_t *req)
void uv_fs_req_cleanup(uv_fs_t *req)
int uv_fs_lstat(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_fs_cb cb)
static ssize_t uv__fs_pathmax_size(const char *path)
int uv_fs_read(uv_loop_t *loop, uv_fs_t *req, uv_file file, const uv_buf_t bufs[], unsigned int nbufs, int64_t off, uv_fs_cb cb)
static ssize_t uv__fs_copyfile(uv_fs_t *req)
int uv_fs_chmod(uv_loop_t *loop, uv_fs_t *req, const char *path, int mode, uv_fs_cb cb)
int uv_fs_lchown(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb)
int uv_fs_link(uv_loop_t *loop, uv_fs_t *req, const char *path, const char *new_path, uv_fs_cb cb)
static int uv__fs_statx(int fd, const char *path, int is_fstat, int is_lstat, uv_stat_t *buf)
int uv_fs_realpath(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_fs_cb cb)
int uv_fs_fdatasync(uv_loop_t *loop, uv_fs_t *req, uv_file file, uv_fs_cb cb)
static ssize_t uv__fs_fsync(uv_fs_t *req)
static void uv__fs_work(struct uv__work *w)
int uv_fs_statfs(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_fs_cb cb)
static void uv__mkostemp_initonce(void)
int uv_fs_fsync(uv_loop_t *loop, uv_fs_t *req, uv_file file, uv_fs_cb cb)
static int uv__fs_scandir_filter(UV_CONST_DIRENT *dent)
int uv_fs_fchmod(uv_loop_t *loop, uv_fs_t *req, uv_file file, int mode, uv_fs_cb cb)
static int uv__fs_stat(const char *path, uv_stat_t *buf)
int uv_fs_write(uv_loop_t *loop, uv_fs_t *req, uv_file file, const uv_buf_t bufs[], unsigned int nbufs, int64_t off, uv_fs_cb cb)
int uv_fs_rmdir(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_fs_cb cb)
int uv_fs_readdir(uv_loop_t *loop, uv_fs_t *req, uv_dir_t *dir, uv_fs_cb cb)
static ssize_t uv__fs_sendfile_emul(uv_fs_t *req)
int uv_fs_readlink(uv_loop_t *loop, uv_fs_t *req, const char *path, uv_fs_cb cb)
void error(const char *msg)
void * uv__reallocf(void *ptr, size_t size)
void uv__fs_scandir_cleanup(uv_fs_t *req)
char * uv__strdup(const char *s)
void * uv__malloc(size_t size)
void uv__fs_readdir_cleanup(uv_fs_t *req)
uv_dirent_type_t uv__fs_get_dirent_type(uv__dirent_t *dent)
#define uv__load_relaxed(p)
#define uv__store_relaxed(p, v)
#define STATIC_ASSERT(expr)
#define uv__req_unregister(loop, req)
UV_EXTERN void uv_once(uv_once_t *guard, void(*callback)(void))
UV_EXTERN void uv_rwlock_rdlock(uv_rwlock_t *rwlock)
#define UV_FS_COPYFILE_FICLONE_FORCE
void(* uv_fs_cb)(uv_fs_t *req)
#define UV_FS_COPYFILE_EXCL
UV_EXTERN void uv_rwlock_rdunlock(uv_rwlock_t *rwlock)
#define UV_FS_COPYFILE_FICLONE
static const z80_opcode fd[]
int read(izstream &zs, T *x, Items items)