OSDN Git Service

Introduce FileRotator.
authorJeff Sharkey <jsharkey@android.com>
Mon, 9 Jan 2012 00:41:36 +0000 (16:41 -0800)
committerJeff Sharkey <jsharkey@android.com>
Fri, 13 Jan 2012 23:27:28 +0000 (15:27 -0800)
commita27a3e8ad7d20dea63ef2d5cb8b6ec7e56c20a89
treea233bcf4a407daa0652fd6229930aaaa348e2f35
parent6a78cd85867c5f22e4e82259b81fab46088331ad
Introduce FileRotator.

Utility that rotates files over time, similar to logrotate. There is
a single "active" file, which is periodically rotated into historical
files, and eventually deleted entirely. Files are stored under a
specific directory with a well-known prefix.

Bug: 5386531
Change-Id: I29f821a881247e50ce0f6f73b20bbd020db39e43
core/java/com/android/internal/util/FileRotator.java [new file with mode: 0644]
core/tests/coretests/src/com/android/internal/util/FileRotatorTest.java [new file with mode: 0644]