1#include "file_system.h"
5#include "platforms/wasm/fs_wasm.h"
6#elif __has_include(<SD.h>)
14FASTLED_NAMESPACE_BEGIN
18__attribute__((weak)) FsImplRef make_sdcard_filesystem(
int cs_pin) {
19 return FsImplRef::Null();
22bool FileSystem::beginSd(
int cs_pin) {
23 mFs = make_sdcard_filesystem(cs_pin);
31bool FileSystem::begin(FsImplRef platform_filesystem) {
32 mFs = platform_filesystem;
40size_t FileHandle::bytesLeft()
const {
return size() - pos(); }
42FileSystem::FileSystem() : mFs() {}
45void FileSystem::end() {
51void FileSystem::close(FileHandleRef file) { mFs->close(file); }
53FileHandleRef FileSystem::openRead(
const char *path) {
return mFs->openRead(path); }
54Video FileSystem::openVideo(
const char *path,
size_t pixelsPerFrame,
float fps,
size_t nFrameHistory) {
56 FileHandleRef file = openRead(path);
60 video.begin(file, pixelsPerFrame, fps, nFrameHistory);