oveRTOS C++ API
C++20 RAII wrappers for the oveRTOS C API
Loading...
Searching...
No Matches
Functions
ove::fs Namespace Reference

Thin C++ wrappers around the oveRTOS filesystem utility functions. More...

Functions

int mount (const char *dev_path, const char *mount_point)
 Mounts a filesystem at the given mount point.
 
void unmount (const char *mount_point)
 Unmounts a previously mounted filesystem.
 
int unlink (const char *path)
 Deletes a file from the filesystem.
 
int rename (const char *old_path, const char *new_path)
 Renames or moves a file or directory.
 

Detailed Description

Thin C++ wrappers around the oveRTOS filesystem utility functions.

Available when CONFIG_OVE_FS is enabled. File and directory I/O is handled by the File and Dir RAII classes below.

Function Documentation

◆ mount()

int ove::fs::mount ( const char *  dev_path,
const char *  mount_point 
)
inline

Mounts a filesystem at the given mount point.

Parameters
[in]dev_pathPath to the block device or image file.
[in]mount_pointDirectory path at which to mount the filesystem.
Returns
OVE_OK on success, or a negative error code.

◆ unmount()

void ove::fs::unmount ( const char *  mount_point)
inline

Unmounts a previously mounted filesystem.

Parameters
[in]mount_pointThe mount point path passed to mount().

◆ unlink()

int ove::fs::unlink ( const char *  path)
inline

Deletes a file from the filesystem.

Parameters
[in]pathAbsolute path to the file.
Returns
OVE_OK on success, or a negative error code.

◆ rename()

int ove::fs::rename ( const char *  old_path,
const char *  new_path 
)
inline

Renames or moves a file or directory.

Parameters
[in]old_pathCurrent path of the file or directory.
[in]new_pathDesired new path.
Returns
OVE_OK on success, or a negative error code.