[physfs] request for 'openReadWrite'

Matheus Izvekov mizvekov at gmail.com
Sat Apr 25 06:23:35 EDT 2009

> Since the library can't write to files inside archives at the moment
> anyway, I don't think it's fair to expect such functionality when
> opening a file for both reading and writing either.

Well this argument fails to account for the fact that physfs separates
writable files from everything else. Also, openAppend already violates

> The proposed solution would be better to implement in your application
> rather than inside PhysFS. We do something similar with music files
> currently, because SDL_mixer can only stream from physical files. So
> if a music file is inside an archive, we temporarily extract it to the
> writable directory.

I don't see how would that apply to me. If I can't have rw files, the
best solution after that would be to keep the file path around instead
of just the file handle, and open it for either read or write depending
on the operation, and then close it shortly after. Performance issues
and memory fragmentation aside, this is very unpleasant to maintain, and
I would much rather have platform dependance.

> Regards,
> Bjørn
> _______________________________________________
> physfs mailing list
> physfs at icculus.org
> http://icculus.org/mailman/listinfo/physfs

More information about the physfs mailing list