• Home
  • Raw
  • Download

Lines Matching refs:fop_fd

41 	lws_fop_fd_t fop_fd;  in _lws_plat_file_open()  local
56 fop_fd = malloc(sizeof(*fop_fd)); in _lws_plat_file_open()
57 if (!fop_fd) in _lws_plat_file_open()
60 fop_fd->fops = fops; in _lws_plat_file_open()
63 fop_fd->fd = (int)(intptr_t)ret; in _lws_plat_file_open()
65 fop_fd->fd = ret; in _lws_plat_file_open()
67 fop_fd->filesystem_priv = ret; in _lws_plat_file_open()
68 fop_fd->flags = *flags; in _lws_plat_file_open()
69 fop_fd->len = GetFileSize(ret, NULL); in _lws_plat_file_open()
71 fop_fd->len = llFileSize.QuadPart; in _lws_plat_file_open()
73 fop_fd->pos = 0; in _lws_plat_file_open()
75 return fop_fd; in _lws_plat_file_open()
82 _lws_plat_file_close(lws_fop_fd_t *fop_fd) in _lws_plat_file_close() argument
84 HANDLE fd = (*fop_fd)->filesystem_priv; in _lws_plat_file_close()
86 free(*fop_fd); in _lws_plat_file_close()
87 *fop_fd = NULL; in _lws_plat_file_close()
95 _lws_plat_file_seek_cur(lws_fop_fd_t fop_fd, lws_fileofs_t offset) in _lws_plat_file_seek_cur() argument
100 if (!SetFilePointerEx((HANDLE)fop_fd->filesystem_priv, l, NULL, FILE_CURRENT)) in _lws_plat_file_seek_cur()
102 lwsl_err("error seeking from cur %ld, offset %ld\n", (long)fop_fd->pos, (long)offset); in _lws_plat_file_seek_cur()
109 if (!SetFilePointerEx((HANDLE)fop_fd->filesystem_priv, zero, &newPos, FILE_CURRENT)) in _lws_plat_file_seek_cur()
111 lwsl_err("error seeking from cur %ld, offset %ld\n", (long)fop_fd->pos, (long)offset); in _lws_plat_file_seek_cur()
114 fop_fd->pos = newPos.QuadPart; in _lws_plat_file_seek_cur()
120 _lws_plat_file_read(lws_fop_fd_t fop_fd, lws_filepos_t *amount, in _lws_plat_file_read() argument
125 if (!ReadFile((HANDLE)fop_fd->filesystem_priv, buf, (DWORD)len, &_amount, NULL)) { in _lws_plat_file_read()
131 fop_fd->pos += _amount; in _lws_plat_file_read()
138 _lws_plat_file_write(lws_fop_fd_t fop_fd, lws_filepos_t *amount, in _lws_plat_file_write() argument
143 if (!WriteFile((HANDLE)fop_fd->filesystem_priv, buf, (DWORD)len, &_amount, NULL)) { in _lws_plat_file_write()
149 fop_fd->pos += _amount; in _lws_plat_file_write()