MCPcopy Create free account
hub / github.com/MaxBelkov/visualsyslog / GetFileNameToRotate

Method GetFileNameToRotate

source/fdb.cpp:93–111  ·  view source on GitHub ↗

---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

91}
92//---------------------------------------------------------------------------
93String TStorageFile::GetFileNameToRotate(int num)
94{
95 String f = GetFileName();
96 if( num == 0 )
97 {
98 return f;
99 }
100 else if( num > 0 && num <= rotation_count )
101 {
102 // file f have an extension ?
103 String e = ExtractFileExt(f);
104 if( e.Length() > 0 )
105 f = ChangeFileExt(f, IntToStr(num) + e);
106 else
107 f = f + IntToStr(num);
108 return f;
109 }
110 return String();
111}
112//---------------------------------------------------------------------------
113String TStorageFile::GetNewRotationName(void)
114{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected