Feature request: extra RWops functions

Hello. I want to make SQLite VFS which works using SDL RWops. However, I run into some problems which could be solved by extending RWops with:

  • truncate — behaves like usual posix truncate, forcing file to be sepcified lenght. Removes extra bytes if there are any or append file with zeroes.
  • isMutable — return false if file is in constant memory/APK/CDrom or other drive which can’t be modifed even as priviliged user, true otherwise.

For exsisting user implementations, truncate may return error like “Unsupported” and isMutable always return true.

What do you think? Thanks.

UPD: another suggestion is

  • isFixed — can we write past the end (and turncate)

+1 for truncate. The absence of this has been inconvenient for me.

Sorry to bump this, but can you, please, take a look at this feature request? I still need it and not sure is there a better place to ask.

1 Like

You can create a bug report here:
http://bugzilla.libsdl.org

And then attach a patch with a proposed implementation for review.