0
tman
5y

Maybe I am picky, but:
Some people made a "FileStorage" API where in the open method you have flags like READ, WRITE, APPEND... And they made it like when you check WRITE the API opens/overwites to an empty file.
And when someon made a github Issue about this behaviour, they flagged it as a feature request. I'm so anoyed by not being able to overwite my data, thats just rude. Like should I use an file storage API to overwrite data like this:
0- Save file inner structure (you can't extract it from the API)
1- Open the file, parse the structure
2- Find file to overwrite
3- Save all the mess again
4- write your own API
5- sigh

Comments
  • 0
    That's the default behaviour of the underlying libc api.
    This is the behaviour since the 80s.
  • 0
    Searching "filestorage api" yielded django as a first result

    Why am i not surprised
  • 0
    @sbiewald Well, to be hosest, I was wrong in the way, that write function should be this. But the lib was written in c++ so there are no technological limitation to have r+ and similar options, or more documentation on the mode enum, than the numerical values
    But yeah, I was the one, who doesn't remembered fopen's methods correctly, nor read the full documentation how to seek the file. I'm sorry to waste your time with this rant.
  • 0
    @yellow-dog It's actually not full API, just a class, so you found the wrong eyecandy:
    https://docs.opencv.org/master/da/...
Add Comment