Lines Matching refs:fd_info

421   struct uv__fd_info_s fd_info;  in fs__open()  local
426 fd_info.flags = flags; in fs__open()
427 fd_info.current_pos.QuadPart = 0; in fs__open()
627 fd_info.is_directory = file_info.Directory; in fs__open()
629 if (fd_info.is_directory) { in fs__open()
630 fd_info.size.QuadPart = 0; in fs__open()
631 fd_info.mapping = INVALID_HANDLE_VALUE; in fs__open()
633 if (!GetFileSizeEx(file, &fd_info.size)) { in fs__open()
639 if (fd_info.size.QuadPart == 0) { in fs__open()
640 fd_info.mapping = INVALID_HANDLE_VALUE; in fs__open()
642 DWORD flProtect = (fd_info.flags & (UV_FS_O_RDONLY | UV_FS_O_WRONLY | in fs__open()
644 fd_info.mapping = CreateFileMapping(file, in fs__open()
647 fd_info.size.HighPart, in fs__open()
648 fd_info.size.LowPart, in fs__open()
650 if (fd_info.mapping == NULL) { in fs__open()
658 uv__fd_hash_add(fd, &fd_info); in fs__open()
671 struct uv__fd_info_s fd_info; in fs__close() local
675 if (uv__fd_hash_remove(fd, &fd_info)) { in fs__close()
676 if (fd_info.mapping != INVALID_HANDLE_VALUE) { in fs__close()
677 CloseHandle(fd_info.mapping); in fs__close()
718 void fs__read_filemap(uv_fs_t* req, struct uv__fd_info_s* fd_info) { in fs__read_filemap() argument
720 int rw_flags = fd_info->flags & in fs__read_filemap()
733 if (fd_info->is_directory) { in fs__read_filemap()
739 pos = fd_info->current_pos; in fs__read_filemap()
745 if (pos.QuadPart >= fd_info->size.QuadPart) { in fs__read_filemap()
755 fd_info->size.QuadPart - pos.QuadPart); in fs__read_filemap()
765 view = MapViewOfFile(fd_info->mapping, in fs__read_filemap()
807 fd_info->current_pos = end_pos; in fs__read_filemap()
808 uv__fd_hash_add(fd, fd_info); in fs__read_filemap()
828 struct uv__fd_info_s fd_info; in fs__read() local
832 if (uv__fd_hash_get(fd, &fd_info)) { in fs__read()
833 fs__read_filemap(req, &fd_info); in fs__read()
898 struct uv__fd_info_s* fd_info) { in fs__write_filemap() argument
900 int force_append = fd_info->flags & UV_FS_O_APPEND; in fs__write_filemap()
901 int rw_flags = fd_info->flags & in fs__write_filemap()
915 if (fd_info->is_directory) { in fs__write_filemap()
931 pos = fd_info->size; in fs__write_filemap()
933 pos = fd_info->current_pos; in fs__write_filemap()
941 if (end_pos.QuadPart > fd_info->size.QuadPart) { in fs__write_filemap()
942 if (fd_info->mapping != INVALID_HANDLE_VALUE) { in fs__write_filemap()
943 CloseHandle(fd_info->mapping); in fs__write_filemap()
946 fd_info->mapping = CreateFileMapping(file, in fs__write_filemap()
952 if (fd_info->mapping == NULL) { in fs__write_filemap()
955 fd_info->mapping = INVALID_HANDLE_VALUE; in fs__write_filemap()
956 fd_info->size.QuadPart = 0; in fs__write_filemap()
957 fd_info->current_pos.QuadPart = 0; in fs__write_filemap()
958 uv__fd_hash_add(fd, fd_info); in fs__write_filemap()
962 fd_info->size = end_pos; in fs__write_filemap()
963 uv__fd_hash_add(fd, fd_info); in fs__write_filemap()
968 view = MapViewOfFile(fd_info->mapping, in fs__write_filemap()
1011 fd_info->current_pos = end_pos; in fs__write_filemap()
1012 uv__fd_hash_add(fd, fd_info); in fs__write_filemap()
1034 struct uv__fd_info_s fd_info; in fs__write() local
1046 if (uv__fd_hash_get(fd, &fd_info)) { in fs__write()
1047 fs__write_filemap(req, handle, &fd_info); in fs__write()
2304 struct uv__fd_info_s fd_info = { 0 }; in fs__ftruncate() local
2313 if (uv__fd_hash_get(fd, &fd_info)) { in fs__ftruncate()
2314 if (fd_info.is_directory) { in fs__ftruncate()
2319 if (fd_info.mapping != INVALID_HANDLE_VALUE) { in fs__ftruncate()
2320 CloseHandle(fd_info.mapping); in fs__ftruncate()
2337 if (fd_info.flags) { in fs__ftruncate()
2339 fd_info.mapping = INVALID_HANDLE_VALUE; in fs__ftruncate()
2340 fd_info.size.QuadPart = 0; in fs__ftruncate()
2341 fd_info.current_pos.QuadPart = 0; in fs__ftruncate()
2342 uv__fd_hash_add(fd, &fd_info); in fs__ftruncate()
2347 if (fd_info.flags) { in fs__ftruncate()
2348 fd_info.size = eof_info.EndOfFile; in fs__ftruncate()
2350 if (fd_info.size.QuadPart == 0) { in fs__ftruncate()
2351 fd_info.mapping = INVALID_HANDLE_VALUE; in fs__ftruncate()
2353 DWORD flProtect = (fd_info.flags & (UV_FS_O_RDONLY | UV_FS_O_WRONLY | in fs__ftruncate()
2355 fd_info.mapping = CreateFileMapping(handle, in fs__ftruncate()
2358 fd_info.size.HighPart, in fs__ftruncate()
2359 fd_info.size.LowPart, in fs__ftruncate()
2361 if (fd_info.mapping == NULL) { in fs__ftruncate()
2364 fd_info.mapping = INVALID_HANDLE_VALUE; in fs__ftruncate()
2365 fd_info.size.QuadPart = 0; in fs__ftruncate()
2366 fd_info.current_pos.QuadPart = 0; in fs__ftruncate()
2367 uv__fd_hash_add(fd, &fd_info); in fs__ftruncate()
2372 uv__fd_hash_add(fd, &fd_info); in fs__ftruncate()