arduino / arduino/ArduinoCore-API

File base class

Open
#114 2 comments 4 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
306
Forks
150
PR merge metrics
No merged PRs in 30d

Description

Similar to Print, Stream, Client, Server... we probably need a File base class.

Currently File is defined in the SD library, and also in the Bridge library for Yun. Most programs in the Arduino ecosystem which use files are tied to the SD library. Because they include SD.h in their headers, the SD library is automatically brought into the project.

But the SD library isn't the only possible source for files. Flash chips, USB mass storage, network filesystems can also provide files. Without a base class, each library using files needs to be edited.

Use of alternate SD card libraries, like SdFat, is also very difficult without a base class because so many libraries which consume files are SD.h included by their code.

Hopefully the time has come to move File out of the SD library and into an abstract base class?

Contributor guide

No contributing guide indexed for this repository

Research direction

Read the existing File definitions in the SD and Bridge libraries, then compare the related Print, Stream, Client, and Server base classes. Define the shared API and verify that file-providing libraries can use it without consumers including SD.h; the issue does not name a test or specific entry-point.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api, embedded-iot
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.