Git Product home page Git Product logo

Comments (9)

thebigpotatoe avatar thebigpotatoe commented on August 27, 2024

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.

happytm avatar happytm commented on August 27, 2024

I agree with this request. I can use file containing sensor data with tabulator.js. http://tabulator.info/

from effortless-spiffs.

thebigpotatoe avatar thebigpotatoe commented on August 27, 2024

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.

jshep321 avatar jshep321 commented on August 27, 2024

Awesome.

Works as expected on my device (ESP32-WROOM). Thanks!

from effortless-spiffs.

jshep321 avatar jshep321 commented on August 27, 2024

@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.

thebigpotatoe avatar thebigpotatoe commented on August 27, 2024

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.

happytm avatar happytm commented on August 27, 2024

@thebigpotatoe Is it possible to update example code with append method?

Thanks.

from effortless-spiffs.

jshep321 avatar jshep321 commented on August 27, 2024

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.

happytm avatar happytm commented on August 27, 2024

@jshep321 Thanks.

from effortless-spiffs.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.