arduino-emulator
Loading...
Searching...
No Matches
DirectoryFS Class Reference

File system (ESP32 FS API) which is a directory of the computer: open("/test.txt") opens <root>/test.txt. The root is the value of an environment variable or a default. More...

#include <DirectoryFS.h>

Inheritance diagram for DirectoryFS:
LittleFSClass SDMMCFS

Public Member Functions

 DirectoryFS (const char *envName, const char *defaultRoot)
bool beginRoot ()
 Determines the root directory: the environment variable or the default.
void end ()
bool exists (const char *path)
bool format ()
const char * getRoot ()
bool mkdir (const char *path)
File open (const char *path, const char *mode="r", bool create=false)
 Opens a file: mode "r", "w", "a", "r+", "w+" or "a+".
bool remove (const char *path)
bool rename (const char *from, const char *to)
bool rmdir (const char *path)
void setRoot (const char *dir)
 Changes the root directory.
size_t totalBytes ()
size_t usedBytes ()

Protected Member Functions

std::string fullPath (const char *path)

Static Protected Member Functions

static int toFlags (const char *mode)

Protected Attributes

const char * default_root
const char * env_name
std::string root

Detailed Description

File system (ESP32 FS API) which is a directory of the computer: open("/test.txt") opens <root>/test.txt. The root is the value of an environment variable or a default.


The documentation for this class was generated from the following file: