Lines Matching refs:req
37 uv_fs_t req;
39 uv_fs_unlink(NULL, &req, "test_dir/file1", NULL);
40 uv_fs_req_cleanup(&req);
41 uv_fs_unlink(NULL, &req, "test_dir/file2", NULL);
42 uv_fs_req_cleanup(&req);
43 uv_fs_rmdir(NULL, &req, "test_dir/test_subdir", NULL);
44 uv_fs_req_cleanup(&req);
45 uv_fs_rmdir(NULL, &req, "test_dir", NULL);
46 uv_fs_req_cleanup(&req);
49 static void empty_closedir_cb(uv_fs_t* req) {
50 ASSERT_PTR_EQ(req, &closedir_req);
51 ASSERT_EQ(req->fs_type, UV_FS_CLOSEDIR);
52 ASSERT_OK(req->result);
54 uv_fs_req_cleanup(req);
57 static void empty_readdir_cb(uv_fs_t* req) {
61 ASSERT_PTR_EQ(req, &readdir_req);
62 ASSERT_EQ(req->fs_type, UV_FS_READDIR);
63 ASSERT_OK(req->result);
64 dir = req->ptr;
65 uv_fs_req_cleanup(req);
73 static void empty_opendir_cb(uv_fs_t* req) {
77 ASSERT_PTR_EQ(req, &opendir_req);
78 ASSERT_EQ(req->fs_type, UV_FS_OPENDIR);
79 ASSERT_OK(req->result);
80 ASSERT_NOT_NULL(req->ptr);
81 dir = req->ptr;
89 uv_fs_req_cleanup(req);
110 /* Fill the req to ensure that required fields are cleaned up. */
125 /* Fill the req to ensure that required fields are cleaned up. */
136 /* Fill the req to ensure that required fields are cleaned up. */
144 /* Fill the req to ensure that required fields are cleaned up. */
170 static void non_existing_opendir_cb(uv_fs_t* req) {
171 ASSERT_PTR_EQ(req, &opendir_req);
172 ASSERT_EQ(req->fs_type, UV_FS_OPENDIR);
173 ASSERT_EQ(req->result, UV_ENOENT);
174 ASSERT_NULL(req->ptr);
176 uv_fs_req_cleanup(req);
186 /* Fill the req to ensure that required fields are cleaned up. */
197 /* Fill the req to ensure that required fields are cleaned up. */
222 static void file_opendir_cb(uv_fs_t* req) {
223 ASSERT_PTR_EQ(req, &opendir_req);
224 ASSERT_EQ(req->fs_type, UV_FS_OPENDIR);
225 ASSERT_EQ(req->result, UV_ENOTDIR);
226 ASSERT_NULL(req->ptr);
228 uv_fs_req_cleanup(req);
238 /* Fill the req to ensure that required fields are cleaned up. */
251 /* Fill the req to ensure that required fields are cleaned up. */
275 static void non_empty_closedir_cb(uv_fs_t* req) {
276 ASSERT_PTR_EQ(req, &closedir_req);
277 ASSERT_OK(req->result);
278 uv_fs_req_cleanup(req);
282 static void non_empty_readdir_cb(uv_fs_t* req) {
285 ASSERT_PTR_EQ(req, &readdir_req);
286 ASSERT_EQ(req->fs_type, UV_FS_READDIR);
287 dir = req->ptr;
289 if (req->result == 0) {
290 uv_fs_req_cleanup(req);
297 ASSERT_EQ(1, req->result);
312 uv_fs_req_cleanup(req);
322 static void non_empty_opendir_cb(uv_fs_t* req) {
326 ASSERT_PTR_EQ(req, &opendir_req);
327 ASSERT_EQ(req->fs_type, UV_FS_OPENDIR);
328 ASSERT_OK(req->result);
329 ASSERT_NOT_NULL(req->ptr);
331 dir = req->ptr;
340 uv_fs_req_cleanup(req);
395 /* Fill the req to ensure that required fields are cleaned up. */
433 /* Fill the req to ensure that required fields are cleaned up. */
441 /* Fill the req to ensure that required fields are cleaned up. */