\hypertarget{structlws__plat__file__ops}{}\section{lws\+\_\+plat\+\_\+file\+\_\+ops Struct Reference}
\label{structlws__plat__file__ops}\index{lws\+\_\+plat\+\_\+file\+\_\+ops@{lws\+\_\+plat\+\_\+file\+\_\+ops}}


{\ttfamily \#include $<$libwebsockets.\+h$>$}

\subsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
lws\+\_\+filefd\+\_\+type($\ast$ \hyperlink{structlws__plat__file__ops_ad37a97abc68d0af967cef874f4d8df32}{open} )(struct lws $\ast$wsi, const char $\ast$filename, unsigned long $\ast$filelen, int flags)
\item 
int($\ast$ \hyperlink{structlws__plat__file__ops_a034ec96f2fbaf52b4aa3e82d20795f7b}{close} )(struct lws $\ast$wsi, lws\+\_\+filefd\+\_\+type fd)
\item 
unsigned long($\ast$ \hyperlink{structlws__plat__file__ops_abfcda19b003dcc13c61ff9e2bb4ff869}{seek\+\_\+cur} )(struct lws $\ast$wsi, lws\+\_\+filefd\+\_\+type fd, long offset\+\_\+from\+\_\+cur\+\_\+pos)
\item 
int($\ast$ \hyperlink{structlws__plat__file__ops_a01f483807a9862736b17ba9ed5110c40}{read} )(struct lws $\ast$wsi, lws\+\_\+filefd\+\_\+type fd, unsigned long $\ast$amount, unsigned char $\ast$buf, unsigned long len)
\item 
int($\ast$ \hyperlink{structlws__plat__file__ops_a1fae8330ee94649a3551e31a30809793}{write} )(struct lws $\ast$wsi, lws\+\_\+filefd\+\_\+type fd, unsigned long $\ast$amount, unsigned char $\ast$buf, unsigned long len)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
struct \hyperlink{structlws__plat__file__ops}{lws\+\_\+plat\+\_\+file\+\_\+ops} -\/ Platform-\/specific file operations

These provide platform-\/agnostic ways to deal with filesystem access in the library and in the user code. 

\subsection{Field Documentation}
\index{lws\+\_\+plat\+\_\+file\+\_\+ops@{lws\+\_\+plat\+\_\+file\+\_\+ops}!close@{close}}
\index{close@{close}!lws\+\_\+plat\+\_\+file\+\_\+ops@{lws\+\_\+plat\+\_\+file\+\_\+ops}}
\subsubsection[{\texorpdfstring{close}{close}}]{\setlength{\rightskip}{0pt plus 5cm}int($\ast$ lws\+\_\+plat\+\_\+file\+\_\+ops\+::close) (struct lws $\ast$wsi, lws\+\_\+filefd\+\_\+type fd)}\hypertarget{structlws__plat__file__ops_a034ec96f2fbaf52b4aa3e82d20795f7b}{}\label{structlws__plat__file__ops_a034ec96f2fbaf52b4aa3e82d20795f7b}
close file \index{lws\+\_\+plat\+\_\+file\+\_\+ops@{lws\+\_\+plat\+\_\+file\+\_\+ops}!open@{open}}
\index{open@{open}!lws\+\_\+plat\+\_\+file\+\_\+ops@{lws\+\_\+plat\+\_\+file\+\_\+ops}}
\subsubsection[{\texorpdfstring{open}{open}}]{\setlength{\rightskip}{0pt plus 5cm}lws\+\_\+filefd\+\_\+type($\ast$ lws\+\_\+plat\+\_\+file\+\_\+ops\+::open) (struct lws $\ast$wsi, const char $\ast$filename, unsigned long $\ast$filelen, int flags)}\hypertarget{structlws__plat__file__ops_ad37a97abc68d0af967cef874f4d8df32}{}\label{structlws__plat__file__ops_ad37a97abc68d0af967cef874f4d8df32}
Open file (always binary access if plat supports it) filelen is filled on exit to be the length of the file flags should be set to O\+\_\+\+R\+D\+O\+N\+LY or O\+\_\+\+R\+D\+WR \index{lws\+\_\+plat\+\_\+file\+\_\+ops@{lws\+\_\+plat\+\_\+file\+\_\+ops}!read@{read}}
\index{read@{read}!lws\+\_\+plat\+\_\+file\+\_\+ops@{lws\+\_\+plat\+\_\+file\+\_\+ops}}
\subsubsection[{\texorpdfstring{read}{read}}]{\setlength{\rightskip}{0pt plus 5cm}int($\ast$ lws\+\_\+plat\+\_\+file\+\_\+ops\+::read) (struct lws $\ast$wsi, lws\+\_\+filefd\+\_\+type fd, unsigned long $\ast$amount, unsigned char $\ast$buf, unsigned long len)}\hypertarget{structlws__plat__file__ops_a01f483807a9862736b17ba9ed5110c40}{}\label{structlws__plat__file__ops_a01f483807a9862736b17ba9ed5110c40}
Read from file, on exit $\ast$amount is set to amount actually read \index{lws\+\_\+plat\+\_\+file\+\_\+ops@{lws\+\_\+plat\+\_\+file\+\_\+ops}!seek\+\_\+cur@{seek\+\_\+cur}}
\index{seek\+\_\+cur@{seek\+\_\+cur}!lws\+\_\+plat\+\_\+file\+\_\+ops@{lws\+\_\+plat\+\_\+file\+\_\+ops}}
\subsubsection[{\texorpdfstring{seek\+\_\+cur}{seek\_cur}}]{\setlength{\rightskip}{0pt plus 5cm}unsigned long($\ast$ lws\+\_\+plat\+\_\+file\+\_\+ops\+::seek\+\_\+cur) (struct lws $\ast$wsi, lws\+\_\+filefd\+\_\+type fd, long offset\+\_\+from\+\_\+cur\+\_\+pos)}\hypertarget{structlws__plat__file__ops_abfcda19b003dcc13c61ff9e2bb4ff869}{}\label{structlws__plat__file__ops_abfcda19b003dcc13c61ff9e2bb4ff869}
seek from current position \index{lws\+\_\+plat\+\_\+file\+\_\+ops@{lws\+\_\+plat\+\_\+file\+\_\+ops}!write@{write}}
\index{write@{write}!lws\+\_\+plat\+\_\+file\+\_\+ops@{lws\+\_\+plat\+\_\+file\+\_\+ops}}
\subsubsection[{\texorpdfstring{write}{write}}]{\setlength{\rightskip}{0pt plus 5cm}int($\ast$ lws\+\_\+plat\+\_\+file\+\_\+ops\+::write) (struct lws $\ast$wsi, lws\+\_\+filefd\+\_\+type fd, unsigned long $\ast$amount, unsigned char $\ast$buf, unsigned long len)}\hypertarget{structlws__plat__file__ops_a1fae8330ee94649a3551e31a30809793}{}\label{structlws__plat__file__ops_a1fae8330ee94649a3551e31a30809793}
Write to file, on exit $\ast$amount is set to amount actually written 

The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
lib/\hyperlink{libwebsockets_8h}{libwebsockets.\+h}\end{DoxyCompactItemize}
