Snorktracker
 All Data Structures Files Functions Variables Macros Pages
Functions
Spiffs.h File Reference

Go to the source code of this file.

Functions

String readFromSpiffs (String path)
 

Detailed Description

Helper-function for the SPIFF.

Definition in file Spiffs.h.

Function Documentation

String readFromSpiffs ( String  path)

Read the content of a file from the SPIFF file-system.

Definition at line 24 of file Spiffs.h.

References MyDbg().

25 {
26  String ret;
27  File file = SPIFFS.open(path.c_str(), "r");
28 
29  if (!file) {
30  MyDbg((String) F("SPIFFS File not found: '") + path + F("'"));
31  } else {
32  ret = file.readString();
33  file.close();
34  }
35  return ret;
36 }
void MyDbg(String info, bool fromWebServer=false, bool newline=true)
Definition: Utils.h:94