| 176 | } |
| 177 | |
| 178 | int 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. |
nothing calls this directly
no test coverage detected