icculus / physfs

A portable, flexible file i/o abstraction.
https://icculus.org/physfs/
zlib License
560 stars 98 forks source link

File watcher plans #60

Open plekakis opened 1 year ago

plekakis commented 1 year ago

Is there a plan on adding support for watching a directory for changes? Ideally via native file watch API.

icculus commented 1 year ago

That...is an interesting idea. I don't have plans for it atm, but let me look into how this works on various platforms and see if this makes sense!

plekakis commented 1 year ago

Thanks for looking into this, I hope other people will find it useful as well. The main driving force behind it is to: 1) Not write a filewatcher which would require additional interop with converting from physical <-> virtual filenames and 2) Being able to watch virtual directories would give additional flexibility.

Consider for instance a hot-reload system which watches the asset directory and on file change triggers a recompilation of that asset. I'm sure there's other example use cases.