Atmel Software Framework

fs.c File Reference
#include <string.h>
#include "lwip/def.h"
#include <net/fs.h>
#include <net/fsdata_file.h>

Functions

int fs_open (char *name, struct fs_file *file)
 Assumes that name is NUL-terminated. More...
 
void fs_register_root (const struct fsdata_file *static_root, const struct fsdata_file *dyn_root)
 

Variables

static struct fsdata_filefs_dyn_root
 
static struct fsdata_filefs_static_root
 

int fs_open ( char *  name,
struct fs_file file 
)

Assumes that name is NUL-terminated.

References fsdata_file::cb, fs_file::data, fs_file::len, fsdata_file::name, fsdata_file::next, and NULL.

Referenced by http_recv().

void fs_register_root ( const struct fsdata_file static_root,
const struct fsdata_file dyn_root 
)

Register a new root/dynroot file system to be used by fs_open(). This will replace any existing file system registration.

Parameters
static_rootThe static root filesystem (filenames must match exactly).
dyn_rootThe dynamic root filesystem (partial filename match possible).

Referenced by fsdata_app_enable().

struct fsdata_file* fs_dyn_root
static
struct fsdata_file* fs_static_root
static