DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ SaveFile()

bool PluginBase::SaveFile ( )
inlineprivate

См. определение в файле PluginFileHandler.c строка 82

83 {
84 if ( m_ReadOnly )
85 {
86 return false;
87 }
88
90 {
92 }
93
94 //Log("SaveFile -> Opening File: "+GetFileName());
95
96 FileHandle file_index = OpenFile(GetFileName(), FileMode.WRITE);
97
98 if ( file_index == 0 )
99 {
100 return false;
101 }
102
103 for ( int i = 0; i < m_FileContent.Count(); ++i)
104 {
105 //Log("SaveFile -> Writing: "+m_FileContent.Get(i));
106 FPrintln(file_index, m_FileContent.Get(i));
107 }
108
109 CloseFile(file_index);
110
111 return true;
112 }
bool m_ReadOnly
Определения PluginFileHandler.c:19
string GetFileName()
Определения PluginFileHandler.c:42
string GetSubFolderName()
Определения PluginFileHandler.c:47
ref TStringArray m_FileContent
Определения PluginFileHandler.c:22
FileMode
Определения EnSystem.c:383
proto void CloseFile(FileHandle file)
Close the File.
proto native bool MakeDirectory(string name)
Makes a directory.
proto FileHandle OpenFile(string name, FileMode mode)
Opens File.
int[] FileHandle
Определения EnSystem.c:390
proto bool FileExist(string name)
Check existence of file.
proto void FPrintln(FileHandle file, void var)
Write to file and add new line.

Перекрестные ссылки CloseFile(), FileExist(), FPrintln(), PluginFileHandler::GetFileName(), GetSubFolderName(), m_FileContent, m_ReadOnly, MakeDirectory() и OpenFile().

Используется в AddText().