com.eurotech.framework.protocol.pcn
Class LogFileLister

java.lang.Object
  extended by com.eurotech.framework.protocol.pcn.LogFileLister

public class LogFileLister
extends Object

Defines log file lister.

Author:
ilya.binshtok

Constructor Summary
LogFileLister(File folder)
          LogFileLister constructor
LogFileLister(String foldername)
          LogFileLister constructor
 
Method Summary
 File[] listAfterLogFiles(int age)
          Lists all log files time-stamped after the current date.
 File[] listAllLogFiles()
          Lists all log files.
 File[] listBeforeLogFiles(int age)
          Lists all log files time-stamped before supplied age in days
 File[] listSameDayLogFiles()
          Lists 'same day' log files
 File[] listYesterdayLogFiles()
          Lists 'yesterday' log files
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogFileLister

public LogFileLister(String foldername)
              throws Exception
LogFileLister constructor

Parameters:
foldername - - folder name as String
Throws:
Exception

LogFileLister

public LogFileLister(File folder)
LogFileLister constructor

Parameters:
folder - - log folder as File
Method Detail

listAllLogFiles

public File[] listAllLogFiles()
Lists all log files.

Returns:
list of all log files as File[]

listSameDayLogFiles

public File[] listSameDayLogFiles()
Lists 'same day' log files

Returns:
list of all log files dated 'same day' as File[]

listYesterdayLogFiles

public File[] listYesterdayLogFiles()
Lists 'yesterday' log files

Returns:
list of all log files dated 'yesterday' as File[]

listBeforeLogFiles

public File[] listBeforeLogFiles(int age)
Lists all log files time-stamped before supplied age in days

Parameters:
age - - number of days before now as int
Returns:
all log files time-stamped before the current date-age as File[]

listAfterLogFiles

public File[] listAfterLogFiles(int age)
Lists all log files time-stamped after the current date.

Parameters:
age - - number of days after now as int
Returns:
all log files time-stamped after the current date+age as File[]


Copyright © 2013. All Rights Reserved.