Class Poco::PurgeStrategy
Author: Applied Informatics Software Engineering GmbH and Contributors
Date: 2009-11-24

# Poco

# class PurgeStrategy

Library: Foundation
Package: Logging
Header: Poco/PurgeStrategy.h

## Description

The PurgeStrategy is used by FileChannel to purge archived log files.

## Inheritance

Known Derived Classes: PurgeByAgeStrategy, PurgeByCountStrategy

## Member Summary

Member Functions: list, purge

## Constructors

### PurgeStrategy

PurgeStrategy();

## Destructor

### ~PurgeStrategy

virtual ~PurgeStrategy();

## Member Functions

### purge

virtual void purge(
const std::string & path
) = 0;

Purges archived log files. The path to the current "hot" log file is given. To find archived log files, look for files with a name consisting of the given path plus any suffix (e.g., .1, .20050929081500, .1.gz). A list of archived files can be obtained by calling the list() method.

### list

void list(
const std::string & path,
std::vector < File > & files
);

Fills the given vector with a list of archived log files. The path of the current "hot" log file is given in path.

All files with the same name as the one given in path, plus some suffix (e.g., .1, .20050929081500, .1.gz) are considered archived files.