BDE 4.14.0 Production release
|
Provide an attribute class for file cleaner configuration.
This component provides a single, simply constrained (value-semantic) attribute class, balb::FileCleanerConfiguration
, that contains a set of attributes (objects and parameters) of a file cleaner.
filePattern
: filesystem pattern used for file matching.maxFileAge
: maximum file age (since last modification).minNumFiles
: minumum number of (newest) files, matching the pattern, that must be kept by the file cleaner.balb::FileCleanerConfiguration
is const thread-safe, meaning that accessors may be invoked concurrently from different threads, but it is not safe to access or modify a balb::FileCleanerConfiguration
in one thread while another thread modifies the same object.
This section illustrates intended use of this component.
The following code illustrates how to create a configuration that can be later supplied to a file cleanup utility (see balb_filecleanerutil for an example of how to use the created configuration to perform file cleaning).
First, we create a balb::FileCleanerConfiguration
object having the default value:
Next, we populate the attributes of our configuration object:
Now, we verify the options are configured correctly:
Finally, we print the configuration value to cout
and return:
This produces the following (multi-line) output: