ns_purgefiles - Purge files by date, keeping max files
Purge files by date, keeping max files.
The parameter path denotes the base of the files to delete. the files are matched internally with the trailing wildcard character *. The files are then sorted by their modification time and the newest number of maxbackups files are kept.
The function ns_rollfile is similar but rolls the file by appending a numeric suffix.