MCPcopy Create free account
hub / github.com/BruceDevices/firmware / viewFile

Function viewFile

src/core/sd_functions.cpp:923–933  ·  view source on GitHub ↗

** Function: viewFile ** Display file content **********************************************************************/

Source from the content-addressed store, hash-verified

921** Display file content
922**********************************************************************/
923void viewFile(FS fs, String filepath) {
924 File file = fs.open(filepath, FILE_READ);
925 if (!file) return;
926
927 ScrollableTextArea area = ScrollableTextArea("VIEW FILE");
928 area.fromFile(file);
929
930 file.close();
931
932 area.show();
933}
934
935/*********************************************************************
936** Function: checkLittleFsSize

Callers 2

native_dialogViewFileFunction · 0.85
loopSDFunction · 0.85

Calls 4

ScrollableTextAreaClass · 0.85
closeMethod · 0.80
showMethod · 0.80
fromFileMethod · 0.45

Tested by

no test coverage detected