RT-Thread RTOS  1.0.0
An open source embedded real-time operating system
Device Virtual File System

Modules

 File Descriptor
 File System API
 File API
 File POSIX API

Functions

void dfs_init (void)
void dfs_lock (void)
void dfs_unlock (void)
const char * dfs_subdir (const char *directory, const char *filename)
char * dfs_normalize_path (const char *directory, const char *filename)

Detailed Description

The DFS (Device Virtual File System) is a vfs file system of RT-Thread RTOS, which is focused on embedded device. VFS is an abstraction layer on top of a more concrete file system. The purpose of a VFS is to allow client applications to access different types of concrete file systems in a uniform way.

dfs.png
Figure 2: Device Virtual File System Architecture

The DFS specifies an interface between the kernel and a concrete file system. Therefore, it is easy to add support for new file system types to the kernel simply by fulfilling the interface.


Function Documentation

void dfs_init ( void  )

this function will initialize device file system.

void dfs_lock ( void  )

this function will lock device file system.

Note:
please don't invoke it on ISR.
void dfs_unlock ( void  )

this function will lock device file system.

Note:
please don't invoke it on ISR.
const char* dfs_subdir ( const char *  directory,
const char *  filename 
)

this function will return a sub-path name under directory.

Parameters:
directorythe parent directory.
filenamethe filename.
Returns:
the subdir pointer in filename
char* dfs_normalize_path ( const char *  directory,
const char *  filename 
)

this function will normalize a path according to specified parent directory and file name.

Parameters:
directorythe parent path
filenamethe file name
Returns:
the built full file path (absolute path)
 All Data Structures Variables