Filesystem repository

Filesystem repository reads parameters from files in given path. This read-only repository might be used to keep server-specific parameters that override defaults.




FSParamRepository fsRepository = new FSParamRepository("~/.server/param/", ".*\\.param$");

Note, that second argument of filesystem repository constructor is Java Regexp, not Ant path.


Filesystem repository performs recurrent scan of provided directory, reading all files that match the regular expression and deserializing them into parameters. It is possible to use overloaded constructor to pass own implementation of deserializer, by default deserializer from smartparam-serializer is used.

File name is not important, only parameter name matters. Serialization format.