C# 클래스 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.
파일 보기 프로젝트 열기: RagingBigFemaleBird/sgs

공개 메소드들

메소드 설명
CreateFile ( string pathName, string fileName, string extension, int maxAllowance ) : FileStream

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

메소드 상세

CreateFile() 공개 정적인 메소드

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.
리턴 System.IO.FileStream

GetLatestFileName() 공개 정적인 메소드

public static GetLatestFileName ( string pathName, string fileName, string extension ) : string
pathName string
fileName string
extension string
리턴 string