libwebsockets
Lightweight C library for HTML5 websockets
lws_plat_file_ops Struct Reference

Data Fields

lws_fop_fd_t(* LWS_FOP_OPEN )(const struct lws_plat_file_ops *fops, const char *filename, const char *vpath, lws_fop_flags_t *flags)
 
int(* LWS_FOP_CLOSE )(lws_fop_fd_t *fop_fd)
 
lws_fileofs_t(* LWS_FOP_SEEK_CUR )(lws_fop_fd_t fop_fd, lws_fileofs_t offset_from_cur_pos)
 
int(* LWS_FOP_READ )(lws_fop_fd_t fop_fd, lws_filepos_t *amount, uint8_t *buf, lws_filepos_t len)
 
int(* LWS_FOP_WRITE )(lws_fop_fd_t fop_fd, lws_filepos_t *amount, uint8_t *buf, lws_filepos_t len)
 
struct lws_fops_index fi [3]
 
const struct lws_plat_file_opsnext
 

Field Documentation

◆ fi

struct lws_fops_index lws_plat_file_ops::fi[3]

vfs path signatures implying use of this fops

◆ LWS_FOP_CLOSE

int(* lws_plat_file_ops::LWS_FOP_CLOSE) (lws_fop_fd_t *fop_fd)

close file AND set the pointer to NULL

◆ LWS_FOP_OPEN

lws_fop_fd_t(* lws_plat_file_ops::LWS_FOP_OPEN) (const struct lws_plat_file_ops *fops, const char *filename, const char *vpath, lws_fop_flags_t *flags)

Open file (always binary access if plat supports it) vpath may be NULL, or if the fops understands it, the point at which the filename's virtual part starts. *flags & LWS_FOP_FLAGS_MASK should be set to O_RDONLY or O_RDWR. If the file may be gzip-compressed, LWS_FOP_FLAG_COMPR_ACCEPTABLE_GZIP is set. If it actually is gzip-compressed, then the open handler should OR LWS_FOP_FLAG_COMPR_IS_GZIP on to *flags before returning.

◆ LWS_FOP_READ

int(* lws_plat_file_ops::LWS_FOP_READ) (lws_fop_fd_t fop_fd, lws_filepos_t *amount, uint8_t *buf, lws_filepos_t len)

Read from file, on exit *amount is set to amount actually read

◆ LWS_FOP_SEEK_CUR

lws_fileofs_t(* lws_plat_file_ops::LWS_FOP_SEEK_CUR) (lws_fop_fd_t fop_fd, lws_fileofs_t offset_from_cur_pos)

seek from current position

◆ LWS_FOP_WRITE

int(* lws_plat_file_ops::LWS_FOP_WRITE) (lws_fop_fd_t fop_fd, lws_filepos_t *amount, uint8_t *buf, lws_filepos_t len)

Write to file, on exit *amount is set to amount actually written

◆ next

const struct lws_plat_file_ops* lws_plat_file_ops::next

NULL or next fops in list


The documentation for this struct was generated from the following file: