Comments (9)
I assume reading from the file, concatenating, and writing would work, but seems heavy duty, especially for larger files.
I assume you are correct, haven't tested it, but that would make sense.
is it possible to append to a file?
It's not in the API as I have never used the append ability of the file systems for any of my projects. I shouldn't be hard to implement, but I just have to find the time to do it. Pull requests are also welcome :)
Can I ask the application use for appending to a file in your case?
from effortless-spiffs.
I agree with this request. I can use file containing sensor data with tabulator.js. http://tabulator.info/
from effortless-spiffs.
Due to popular demand see #10.
I have not tested the methods on hardware yet so feel free to do so.
It should just work I'm hoping as it is just a copy and paste of the save to file methods.
Let us know if it works for your application.
from effortless-spiffs.
Awesome.
Works as expected on my device (ESP32-WROOM). Thanks!
from effortless-spiffs.
@thebigpotatoe
Any idea how long before this is merged into the (arduino/platformio) main branch? I assume they pull directly from this github, but not 100% sure.
from effortless-spiffs.
So given it works, I have to pull it into the main branch and create a new version.
This will get pulled automatically by the platformio/arduino env after a couple of hours
from effortless-spiffs.
@thebigpotatoe Is it possible to update example code with append method?
Thanks.
from effortless-spiffs.
Sure. A one word modification to your example is below:
//append to file using std::strings
std::string newStdString;
if (writeToFlash) {
newStdString = "Hello World";
fileSystem.appendToFile("/stdString.txt", newStdString);
} else {
fileSystem.openFromFile("/stdString.txt", newStdString);
}
Serial.print("std::string is: ");
Serial.println(newStdString.c_str());
from effortless-spiffs.
@jshep321 Thanks.
from effortless-spiffs.
Related Issues (13)
- large file print to serial? HOT 3
- delete file? HOT 2
- File list HOT 2
- ESP8266 SPIFF HOT 1
- Thil library remove files prom the spiffs HOT 1
- Writing array of objects example HOT 1
- Store more string variables but receive back only the last HOT 2
- Unable to store & read back multiple char* values HOT 2
- Optional delay / consolidating writes
- fileSystem.saveToFile("somefile.txt", "21342314") not saving file HOT 3
- Migrate to LittleFS HOT 3
- SD card support HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from effortless-spiffs.