MCPcopy Create free account
hub / github.com/SmingHub/Sming / tryMount

Method tryMount

Sming/Libraries/Spiffs/src/FileSystem.cpp:178–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178int FileSystem::tryMount(spiffs_config& cfg)
179{
180 auto err = SPIFFS_mount(handle(), &cfg, reinterpret_cast<uint8_t*>(workBuffer),
181 reinterpret_cast<uint8_t*>(fileDescriptors), sizeof(fileDescriptors), cache, sizeof(cache),
182 nullptr);
183 if(err < 0) {
184 if(isSpiffsError(err)) {
185 err = translateSpiffsError(err);
186 }
187 debug_ifserr(err, "SPIFFS_mount()");
188 }
189
190 return err;
191}
192
193/*
194 * Format the file system and leave it mounted in an accessible state.

Callers

nothing calls this directly

Calls 2

isSpiffsErrorFunction · 0.85
translateSpiffsErrorFunction · 0.85

Tested by

no test coverage detected