C# Class Sanguosha.Core.Utils.FileRotator

Maintains a file sequence fileName{Date}{Sequence number} and removes the most out dated file when number of files exceeds a certain threshold.
Not thread-safe.
Afficher le fichier Open project: RagingBigFemaleBird/sgs

Méthodes publiques

Méthode Description
CreateFile ( string pathName, string fileName, string extension, int maxAllowance ) : FileStream

GetLatestFileName ( string pathName, string fileName, string extension ) : string

Method Details

CreateFile() public static méthode

public static CreateFile ( string pathName, string fileName, string extension, int maxAllowance ) : FileStream
pathName string Path to the directory under which the new file is to be created.
fileName string Common prefix of the file name.
extension string Extension name of the file. Must starts with "."
maxAllowance int Maximum number of files allowed before rotation starts. Must be greater or equal to 0.
Résultat System.IO.FileStream

GetLatestFileName() public static méthode

public static GetLatestFileName ( string pathName, string fileName, string extension ) : string
pathName string
fileName string
extension string
Résultat string