Contiki-NG
Loading...
Searching...
No Matches
cfs.h File Reference

CFS header file. More...

#include "contiki.h"

Go to the source code of this file.

Macros

#define CFS_READ   1
 Specify that cfs_open() should open a file for reading.
 
#define CFS_WRITE   2
 Specify that cfs_open() should open a file for writing.
 
#define CFS_APPEND   4
 Specify that cfs_open() should append written data to the file rather than overwriting it.
 
#define CFS_SEEK_SET   0
 Specify that cfs_seek() should compute the offset from the beginning of the file.
 
#define CFS_SEEK_CUR   1
 Specify that cfs_seek() should compute the offset from the current position of the file pointer.
 
#define CFS_SEEK_END   2
 Specify that cfs_seek() should compute the offset from the end of the file.
 

Typedefs

typedef int cfs_offset_t
 CFS directory entry name length.
 

Functions

int cfs_open (const char *name, int flags)
 Open a file.
 
void cfs_close (int fd)
 Close an open file.
 
int cfs_read (int fd, void *buf, unsigned int len)
 Read data from an open file.
 
int cfs_write (int fd, const void *buf, unsigned int len)
 Write data to an open file.
 
cfs_offset_t cfs_seek (int fd, cfs_offset_t offset, int whence)
 Seek to a specified position in an open file.
 
int cfs_remove (const char *name)
 Remove a file.
 
int cfs_opendir (struct cfs_dir *dirp, const char *name)
 Open a directory for reading directory entries.
 
int cfs_readdir (struct cfs_dir *dirp, struct cfs_dirent *dirent)
 Read a directory entry.
 
void cfs_closedir (struct cfs_dir *dirp)
 Close a directory opened with cfs_opendir().
 

Detailed Description

CFS header file.

Author
Adam Dunkels adam@.nosp@m.sics.nosp@m..se

Definition in file cfs.h.