3 static bool FileDuplicate(
string source_name,
string dest_name)
5 return CopyFile(source_name, dest_name);
8 static bool FileDelete(
string file)
13 static void FileRename(
string source_name,
string dest_name)
15 FileDuplicate(source_name, dest_name);
16 FileDelete(source_name);
37 override void OnInit()
52 void ClearFileNoSave()
54 m_FileContent.Clear();
63 if ( file_index == 0 )
68 string line_content =
"";
69 int char_count =
FGets( file_index, line_content );
70 while ( char_count != -1 )
72 m_FileContent.Insert(line_content);
74 char_count =
FGets( file_index, line_content );
98 if ( file_index == 0 )
103 for (
int i = 0; i < m_FileContent.Count(); ++i)
106 FPrintln(file_index, m_FileContent.Get(i));
119 void AddText(
string text)
121 AddNewLineNoSave(text);
125 void AddNewLineNoSave(
string text)
127 if ( m_LineLimit > -1 )
129 if ( m_LineLimit == 0 )
134 int lines_count = m_FileContent.Count();
136 if ( lines_count > 0 && lines_count >= m_LineLimit )
138 int remove_indexes = lines_count - m_LineLimit;
140 for (
int i = 0; i <= remove_indexes; ++i )
142 m_FileContent.RemoveOrdered(0);
147 m_FileContent.Insert(text);
152 return m_FileContent;
Plugin interface for controlling of agent pool system.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
array< string > TStringArray
proto void CloseFile(FileHandle file)
Close the File.
proto native bool MakeDirectory(string name)
Makes a directory.
proto native bool CopyFile(string sourceName, string destName)
copy file. destName must be "$profile:" or "$saves:" location
proto int FGets(FileHandle file, string var)
Get line from file, every next call of this function returns next line.
proto FileHandle OpenFile(string name, FileMode mode)
Opens File.
proto bool FileExist(string name)
Check existence of file.
proto native bool DeleteFile(string name)
delete file. Works only on "$profile:" and "$saves:" locations
proto void FPrintln(FileHandle file, void var)
Write to file and add new line.
class PluginLocalEnscriptHistory extends PluginLocalHistoryBase GetSubFolderName()