/libuv/test/ |
H A D | benchmark-fs-stat.c | 40 const char* path; member 46 static void warmup(const char* path) { in warmup() argument 58 sync_stat(reqs + 0, path); in warmup() 62 static void sync_bench(const char* path) { in sync_bench() argument 73 sync_stat(&req, path); in sync_bench() 94 static void async_bench(const char* path) { in async_bench() argument 107 req->path = path; in async_bench() 132 const char path[] = "."; in BENCHMARK_IMPL() local 133 warmup(path); in BENCHMARK_IMPL() 134 sync_bench(path); in BENCHMARK_IMPL() [all …]
|
H A D | test-get-currentexe.c | 43 char path[PATHMAX]; in TEST_IMPL() local 53 snprintf(path, sizeof(path), "%s", executable_path); in TEST_IMPL() 55 ASSERT_NOT_NULL(realpath(executable_path, path)); in TEST_IMPL() 58 match = strstr(buffer, path); in TEST_IMPL() 62 ASSERT(match && !strcmp(match, path)); in TEST_IMPL() 101 match = strstr(buffer, path); in TEST_IMPL() 106 ASSERT_STR_EQ(match, path); in TEST_IMPL()
|
H A D | test-dlerror.c | 28 const char* path = "test/fixtures/load_error.node"; in TEST_IMPL() local 40 r = uv_dlopen(path, &lib); in TEST_IMPL() 48 ASSERT_NOT_NULL(strstr(msg, path)); in TEST_IMPL() 58 ASSERT_NOT_NULL(strstr(msg, path)); in TEST_IMPL()
|
H A D | test-fs-readdir.c | 99 const char* path; in TEST_IMPL() local 106 path = "./empty_dir/"; in TEST_IMPL() 107 uv_fs_mkdir(uv_default_loop(), &mkdir_req, path, 0777, NULL); in TEST_IMPL() 116 path, in TEST_IMPL() 157 uv_fs_rmdir(uv_default_loop(), &rmdir_req, path, NULL); in TEST_IMPL() 181 const char* path; in TEST_IMPL() local 184 path = "./non-existing-dir/"; in TEST_IMPL() 190 r = uv_fs_opendir(uv_default_loop(), &opendir_req, path, NULL); in TEST_IMPL() 203 path, in TEST_IMPL() 233 const char* path; in TEST_IMPL() local [all …]
|
H A D | test-pipe-bind-error.c | 173 char path[512]; in TEST_IMPL() local 174 memset(path, '@', sizeof(path)); in TEST_IMPL() 176 uv_pipe_bind2(&pipe, path, sizeof(path), UV_PIPE_NO_TRUNCATE)); in TEST_IMPL() 180 path, in TEST_IMPL() 181 sizeof(path), in TEST_IMPL()
|
H A D | test-fs.c | 63 const char* path; member 1320 ASSERT_NE(0, strcmp(mkdtemp_req1.path, mkdtemp_req2.path)); in TEST_IMPL() 1353 ASSERT_NE(0, strcmp(mkstemp_req1.path, mkstemp_req2.path)); in TEST_IMPL() 2631 unlink(path); in TEST_IMPL() 2650 checkme.path = path; in TEST_IMPL() 2662 unlink(path); in TEST_IMPL() 2677 unlink(path); in TEST_IMPL() 2703 unlink(path); in TEST_IMPL() 2756 unlink(path); in TEST_IMPL() 2789 checkme.path = path; in TEST_IMPL() [all …]
|
H A D | test-fs-event.c | 121 const char* path, in fail_cb() argument 663 const char path[] = "test/fixtures/empty_file"; in TEST_IMPL() local 672 ASSERT_OK(uv_fs_event_start(watchers + 0, fail_cb, path, 0)); in TEST_IMPL() 744 char path[] = "\\\\?\\X:\\bootsect.bak"; in TEST_IMPL() local 747 strncpy(path + sizeof("\\\\?\\") - 1, sys_drive, 1); in TEST_IMPL() 753 r = uv_fs_event_start(&fs_event, fail_cb, path, 0); in TEST_IMPL() 1214 char path[] = "fs_event_stop_in_cb.txt"; in TEST_IMPL() local 1220 remove(path); in TEST_IMPL() 1221 create_file(path); in TEST_IMPL() 1227 timer.data = path; in TEST_IMPL() [all …]
|
/libuv/src/unix/ |
H A D | fs.c | 110 req->path = path; \ 112 req->path = uv__strdup(path); \ 122 req->path = path; \ 133 memcpy((void*) req->path, path, path_len); \ 306 char* path; in uv__fs_mkstemp() local 309 path = (char*) req->path; in uv__fs_mkstemp() 348 r = mkstemp(path); in uv__fs_mkstemp() 365 path[0] = '\0'; in uv__fs_mkstemp() 1977 if (req->path == NULL) in uv_fs_mkdtemp() 1989 if (req->path == NULL) in uv_fs_mkstemp() [all …]
|
H A D | kqueue.c | 465 const char* path; in uv__fs_event() local 478 path = NULL; in uv__fs_event() 485 path = uv__basename_r(pathbuf); in uv__fs_event() 542 handle->path = uv__strdup(path); in uv_fs_event_start() 543 if (handle->path == NULL) in uv_fs_event_start() 549 uv__free(handle->path); in uv_fs_event_start() 550 handle->path = NULL; in uv_fs_event_start() 577 uv__free(handle->path); in uv_fs_event_start() 578 handle->path = NULL; in uv_fs_event_start() 615 uv__free(handle->path); in uv_fs_event_stop() [all …]
|
H A D | internal.h | 282 int uv__open_cloexec(const char* path, int flags); 321 FILE* uv__open_file(const char* path); 329 int uv__random_readpath(const char* path, void* buf, size_t buflen); 387 UV_UNUSED(static char* uv__basename_r(const char* path)) { in UV_UNUSED() argument 390 s = strrchr(path, '/'); in UV_UNUSED() 392 return (char*) path; in UV_UNUSED() 407 UV_UNUSED(static int uv__lstat(const char* path, struct stat* s)) { in UV_UNUSED() argument 410 rc = lstat(path, s); in UV_UNUSED() 417 UV_UNUSED(static int uv__stat(const char* path, struct stat* s)) { in UV_UNUSED() argument 420 rc = stat(path, s); in UV_UNUSED() [all …]
|
H A D | fsevents.c | 91 char path[1]; member 189 handle->cb(handle, event->path[0] ? event->path : NULL, event->events, 0); in uv__fsevents_cb() 224 char* path; in uv__fsevents_event_cb() local 253 path = paths[i]; in uv__fsevents_event_cb() 254 len = strlen(path); in uv__fsevents_event_cb() 276 path += handle->realpath_len; in uv__fsevents_event_cb() 288 path--; in uv__fsevents_event_cb() 295 path++; in uv__fsevents_event_cb() 302 pos = strchr(path + 1, '/'); in uv__fsevents_event_cb() 312 memcpy(event->path, path, len + 1); in uv__fsevents_event_cb() [all …]
|
H A D | linux.c | 263 char* path; member 2261 char path[256]; in uv__get_cgroupv2_constrained_cpu() local 2276 snprintf(path, sizeof(path), "/sys/fs/cgroup/%.*s/cpu.max", cgroup_size, in uv__get_cgroupv2_constrained_cpu() 2324 char path[256]; in uv__get_cgroupv1_constrained_cpu() local 2336 snprintf(path, sizeof(path), "/sys/fs/cgroup/%.*s/cpu.cfs_quota_us", in uv__get_cgroupv1_constrained_cpu() 2346 snprintf(path, sizeof(path), "/sys/fs/cgroup/%.*s/cpu.cfs_period_us", in uv__get_cgroupv1_constrained_cpu() 2524 const char* path; in uv__inotify_read() local 2560 path = e->len ? (const char*) (e + 1) : uv__basename_r(w->path); in uv__inotify_read() 2641 w->path = memcpy(w + 1, path, len); in uv_fs_event_start() 2649 handle->path = w->path; in uv_fs_event_start() [all …]
|
H A D | os390.c | 663 char* path; in uv_fs_event_start() local 669 path = uv__strdup(filename); in uv_fs_event_start() 670 if (path == NULL) in uv_fs_event_start() 673 rc = os390_regfileint(handle, path); in uv_fs_event_start() 675 uv__free(path); in uv_fs_event_start() 680 handle->path = path; in uv_fs_event_start() 713 if (handle->path != NULL) { in uv__fs_event_stop() 714 uv__free(handle->path); in uv__fs_event_stop() 715 handle->path = NULL; in uv__fs_event_stop() 793 } else if (handle->path == NULL) { in os390_message_queue_handler() [all …]
|
H A D | qnx.c | 59 char path[PATH_MAX]; in uv_exepath() local 63 realpath(_cmdname(NULL), path); in uv_exepath() 64 strlcpy(buffer, path, *size); in uv_exepath()
|
/libuv/src/ |
H A D | heap-inl.h | 111 unsigned int path; in HEAP_EXPORT() local 122 path = 0; in HEAP_EXPORT() 124 path = (path << 1) | (n & 1); in HEAP_EXPORT() 130 if (path & 1) in HEAP_EXPORT() 134 path >>= 1; in HEAP_EXPORT() 156 unsigned int path; in HEAP_EXPORT() local 166 path = 0; in HEAP_EXPORT() 168 path = (path << 1) | (n & 1); in HEAP_EXPORT() 173 if (path & 1) in HEAP_EXPORT() 177 path >>= 1; in HEAP_EXPORT()
|
H A D | fs-poll.c | 48 char path[1]; /* variable length */ member 68 const char* path, in uv_fs_poll_start() argument 79 len = strlen(path); in uv_fs_poll_start() 90 memcpy(ctx->path, path, len + 1); in uv_fs_poll_start() 99 err = uv_fs_stat(loop, &ctx->fs_req, ctx->path, poll_cb); in uv_fs_poll_start() 150 required_len = strlen(ctx->path); in uv_fs_poll_getpath() 156 memcpy(buffer, ctx->path, required_len); in uv_fs_poll_getpath() 180 if (uv_fs_stat(ctx->loop, &ctx->fs_req, ctx->path, poll_cb)) in timer_cb()
|
/libuv/docs/code/proc-streams/ |
H A D | main.c | 20 char path[size]; in main() local 21 uv_exepath(path, &size); in main() 22 strcpy(path + (strlen(path) - strlen("proc-streams")), "test"); in main() 25 args[0] = path; in main()
|
/libuv/docs/code/cgi/ |
H A D | main.c | 18 char path[500]; in invoke_cgi_script() local 19 size_t size = sizeof(path); in invoke_cgi_script() 20 uv_exepath(path, &size); in invoke_cgi_script() 21 strcpy(path + (strlen(path) - strlen("cgi")), "tick"); in invoke_cgi_script() 24 args[0] = path; in invoke_cgi_script()
|
/libuv/docs/code/onchange/ |
H A D | main.c | 10 char path[1024]; in run_command() local 13 uv_fs_event_getpath(handle, path, &size); in run_command() 14 path[size] = '\0'; in run_command() 16 fprintf(stderr, "Change detected in %s: ", path); in run_command()
|
/libuv/src/win/ |
H A D | fs.c | 299 if (path != NULL) { in fs__capture_path() 322 req->path = NULL; in fs__capture_path() 333 if (path != NULL) { in fs__capture_path() 349 req->path = path; in fs__capture_path() 372 req->path = NULL; in uv__fs_req_init() 1184 char* path; in fs__mktemp() local 1186 path = (char*)req->path; in fs__mktemp() 1219 path[0] = '\0'; in fs__mktemp() 2380 path[1] == L':' && IS_SLASH(path[2]); in fs__create_junction() 2866 req->path = NULL; in uv_fs_req_cleanup() [all …]
|
H A D | fs-event.c | 158 const char* path, in uv_fs_event_start() argument 173 handle->path = uv__strdup(path); in uv_fs_event_start() 174 if (!handle->path) { in uv_fs_event_start() 180 last_error = uv__convert_utf8_to_utf16(path, &pathw); in uv_fs_event_start() 326 if (handle->path) { in uv_fs_event_start() 327 uv__free(handle->path); in uv_fs_event_start() 328 handle->path = NULL; in uv_fs_event_start() 383 if (handle->path) { in uv_fs_event_stop() 384 uv__free(handle->path); in uv_fs_event_stop() 385 handle->path = NULL; in uv_fs_event_stop()
|
/libuv/docs/src/ |
H A D | fs_poll.rst | 7 FS Poll handles allow the user to monitor a given path for changes. Unlike 22 after the handle is started, when any change happens to the monitored path. 24 The callback is invoked with `status < 0` if `path` does not exist 49 .. c:function:: int uv_fs_poll_start(uv_fs_poll_t* handle, uv_fs_poll_cb poll_cb, const char* path,… 51 Check the file at `path` for changes every `interval` milliseconds. 63 Get the path being monitored by the handle. The buffer must be preallocated 65 On success, `buffer` will contain the path and `size` its length. If the buffer
|
H A D | fs.rst | 187 .. c:member:: const char* uv_fs_t.path 267 …ivalent to :man:`mkstemp(3)`. The created file path can be found as a null terminated string at `r… 278 Opens `path` as a directory stream. On success, a `uv_dir_t` is allocated 377 `UV_EEXIST` if the destination path already exists. The default behavior 390 If the destination path is created, but an error occurs while copying 391 the data, then the destination path is removed. There is a brief window 471 - Resolved path bypasses subst'd drives. 519 Returns `req->path`. 577 If the path is not a directory, fail the open. 628 If the path identifies a terminal device, opening the path will not cause [all …]
|
/libuv/docs/src/guide/ |
H A D | filesystem.rst | 130 int uv_fs_unlink(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb); 133 int uv_fs_mkdir(uv_loop_t* loop, uv_fs_t* req, const char* path, int mode, uv_fs_cb cb); 136 int uv_fs_rmdir(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb); 139 int uv_fs_opendir(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb); 142 int uv_fs_stat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb); 150 int uv_fs_chmod(uv_loop_t* loop, uv_fs_t* req, const char* path, int mode, uv_fs_cb cb); 154 int uv_fs_lstat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb); 157 int uv_fs_readlink(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb); 158 int uv_fs_realpath(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb); 163 int uv_fs_statfs(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb); [all …]
|
/libuv/include/ |
H A D | uv.h | 1408 const char* path; member 1427 const char* path, 1475 const char* path, 1488 const char* path, 1511 const char* path, 1549 const char* path, 1554 const char* path, 1572 const char* path, 1576 const char* path, 1613 const char* path, [all …]
|