mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-04 06:37:38 +03:00
clang format
This commit is contained in:
parent
3cc9f8d6fb
commit
9cd9dc1f99
@ -1,25 +1,18 @@
|
|||||||
#include "HalStorage.h"
|
#include "HalStorage.h"
|
||||||
|
|
||||||
#include <SDCardManager.h>
|
#include <SDCardManager.h>
|
||||||
|
|
||||||
HalStorage HalStorage::instance;
|
HalStorage HalStorage::instance;
|
||||||
|
|
||||||
HalStorage::HalStorage() {}
|
HalStorage::HalStorage() {}
|
||||||
|
|
||||||
bool HalStorage::begin() {
|
bool HalStorage::begin() { return SdMan.begin(); }
|
||||||
return SdMan.begin();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool HalStorage::ready() const {
|
bool HalStorage::ready() const { return SdMan.ready(); }
|
||||||
return SdMan.ready();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<String> HalStorage::listFiles(const char* path, int maxFiles) {
|
std::vector<String> HalStorage::listFiles(const char* path, int maxFiles) { return SdMan.listFiles(path, maxFiles); }
|
||||||
return SdMan.listFiles(path, maxFiles);
|
|
||||||
}
|
|
||||||
|
|
||||||
String HalStorage::readFile(const char* path) {
|
String HalStorage::readFile(const char* path) { return SdMan.readFile(path); }
|
||||||
return SdMan.readFile(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool HalStorage::readFileToStream(const char* path, Print& out, size_t chunkSize) {
|
bool HalStorage::readFileToStream(const char* path, Print& out, size_t chunkSize) {
|
||||||
return SdMan.readFileToStream(path, out, chunkSize);
|
return SdMan.readFileToStream(path, out, chunkSize);
|
||||||
@ -29,33 +22,19 @@ size_t HalStorage::readFileToBuffer(const char* path, char* buffer, size_t buffe
|
|||||||
return SdMan.readFileToBuffer(path, buffer, bufferSize, maxBytes);
|
return SdMan.readFileToBuffer(path, buffer, bufferSize, maxBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HalStorage::writeFile(const char* path, const String& content) {
|
bool HalStorage::writeFile(const char* path, const String& content) { return SdMan.writeFile(path, content); }
|
||||||
return SdMan.writeFile(path, content);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool HalStorage::ensureDirectoryExists(const char* path) {
|
bool HalStorage::ensureDirectoryExists(const char* path) { return SdMan.ensureDirectoryExists(path); }
|
||||||
return SdMan.ensureDirectoryExists(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
File HalStorage::open(const char* path, const oflag_t oflag) {
|
File HalStorage::open(const char* path, const oflag_t oflag) { return SdMan.open(path, oflag); }
|
||||||
return SdMan.open(path, oflag);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool HalStorage::mkdir(const char* path, const bool pFlag) {
|
bool HalStorage::mkdir(const char* path, const bool pFlag) { return SdMan.mkdir(path, pFlag); }
|
||||||
return SdMan.mkdir(path, pFlag);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool HalStorage::exists(const char* path) {
|
bool HalStorage::exists(const char* path) { return SdMan.exists(path); }
|
||||||
return SdMan.exists(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool HalStorage::remove(const char* path) {
|
bool HalStorage::remove(const char* path) { return SdMan.remove(path); }
|
||||||
return SdMan.remove(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool HalStorage::rmdir(const char* path) {
|
bool HalStorage::rmdir(const char* path) { return SdMan.rmdir(path); }
|
||||||
return SdMan.rmdir(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool HalStorage::openFileForRead(const char* moduleName, const char* path, File& file) {
|
bool HalStorage::openFileForRead(const char* moduleName, const char* path, File& file) {
|
||||||
return SdMan.openFileForRead(moduleName, path, file);
|
return SdMan.openFileForRead(moduleName, path, file);
|
||||||
@ -81,6 +60,4 @@ bool HalStorage::openFileForWrite(const char* moduleName, const String& path, Fi
|
|||||||
return openFileForWrite(moduleName, path.c_str(), file);
|
return openFileForWrite(moduleName, path.c_str(), file);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HalStorage::removeDir(const char* path) {
|
bool HalStorage::removeDir(const char* path) { return SdMan.removeDir(path); }
|
||||||
return SdMan.removeDir(path);
|
|
||||||
}
|
|
||||||
@ -1,8 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
#include <SDCardManager.h>
|
#include <SDCardManager.h>
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
using File = FsFile;
|
using File = FsFile;
|
||||||
|
|
||||||
class HalStorage {
|
class HalStorage {
|
||||||
@ -39,7 +40,7 @@ class HalStorage {
|
|||||||
bool openFileForWrite(const char* moduleName, const String& path, File& file);
|
bool openFileForWrite(const char* moduleName, const String& path, File& file);
|
||||||
bool removeDir(const char* path);
|
bool removeDir(const char* path);
|
||||||
|
|
||||||
static HalStorage& getInstance() { return instance; }
|
static HalStorage& getInstance() { return instance; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static HalStorage instance;
|
static HalStorage instance;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user