← Back

ofxWatchFile

github.com/nariakiiwatani/ofxWatchFile · @nariakiiwatani
OF 0.12 Utilities

automatically reload a file if it is modified

19 2 Last commit 2y ago Created 11y ago

README

Attention

I prefer using ofxWatcher now because it's more flexible and straightforward. Please check it out!

---

ofxWatchFile



auto reload any file when it is modified inspired by ofxAutoReloadedShader

usage

See example. Shortly, see below.

There are 2 ways to receive the result,

ofxWatchFile file;
file.addListener(this, &MyClass::onFileChanged);
// MyClass::onFileChanged is called when the target file is changed


class MyClass : public ofxWatchFile {
	bool reload(ofFile &file) override;
};
// MyClass::reload is called when the target file is changed


License

MIT License.

Get this addon

HTTPS
SSH