WISP ERT (Client)  1.0.0
The WISP Extended Runtime (WISP side)
fs.h File Reference
#include <stddef.h>
#include <sys/types.h>
#include <ert/runtime.h>

Go to the source code of this file.

Functions

ert_status_t ert_open (const char *path, int flags, mode_t mode, void *cb_data, wio_callback_t cb)
 Open a remote file. More...
 
ert_status_t ert_close (int fd, void *cb_data, wio_callback_t cb)
 Close a remote file. More...
 
ert_status_t ert_read (int fd, size_t size, void *cb_data, wio_callback_t cb)
 Read data from remote file. More...
 
ert_status_t ert_write (int fd, const void *buf, size_t size, void *cb_data, wio_callback_t cb)
 Write data to remote file. More...
 

Function Documentation

◆ ert_close()

ert_status_t ert_close ( int  fd,
void *  cb_data,
wio_callback_t  cb 
)

Close a remote file.

Parameters
fdRemote file descriptor.
cb_dataCallback closure data.
cbCallback.
Returns
Error code if failed, otherwise WIO_OK.

◆ ert_open()

ert_status_t ert_open ( const char *  path,
int  flags,
mode_t  mode,
void *  cb_data,
wio_callback_t  cb 
)

Open a remote file.

Parameters
pathRemote file path.
flagsOpen flags.
modeOpen mode.
cb_dataCallback closure data.
cbCallback.
Returns
Error code if failed, otherwise WIO_OK.

◆ ert_read()

ert_status_t ert_read ( int  fd,
size_t  size,
void *  cb_data,
wio_callback_t  cb 
)

Read data from remote file.

Parameters
fdRemote file descriptor.
sizeData size.
cb_dataCallback closure data.
cbCallback.
Returns
Error code if failed, otherwise WIO_OK.

◆ ert_write()

ert_status_t ert_write ( int  fd,
const void *  buf,
size_t  size,
void *  cb_data,
wio_callback_t  cb 
)

Write data to remote file.

Parameters
fdRemote file descriptor.
bufData to write.
sizeSize of data to write.
cb_dataCallback closure data.
cbCallback.
Returns
Error code if failed, otherwise WIO_OK.