#include <AsciiFile.h>

Public Member Functions | |
| AsciiFile (bool CreateBackup_bv=false, const char *BackupExt_Cv=".orig") | |
| AsciiFile (const string &Name_Cv, bool CreateBackup_bv=false, const char *BackupExt_Cv=".orig") | |
| AsciiFile (const char *Name_Cv, bool CreateBackup_bv=false, const char *BackupExt_Cv=".orig") | |
| ~AsciiFile () | |
| bool | insertFile (AsciiFile &File_Cv, unsigned int BeforeLine_iv=0) |
| bool | appendFile (AsciiFile &File_Cv) |
| bool | insertFile (const string &Name_Cv, unsigned int BeforeLine_iv=0) |
| bool | appendFile (const string &Name_Cv) |
| bool | loadFile (const string &Name_Cv) |
| bool | updateFile () |
| bool | saveToFile (const string &Name_Cv) |
| void | append (const string &Line_Cv) |
| void | append (const std::list< string > &Lines_Cv) |
| void | insert (unsigned int Before_iv, const string &Line_Cv) |
| void | remove (unsigned int Start_iv, unsigned int Cnt_iv) |
| void | replace (unsigned int Start_iv, unsigned int Cnt_iv, const string &Line_Cv) |
| void | replace (unsigned int Start_iv, unsigned int Cnt_iv, const std::list< string > &Line_Cv) |
| const string & | operator[] (unsigned int Index_iv) const |
| string & | operator[] (unsigned int Index_iv) |
| int | find (unsigned int Start_iv, const string &Pat_Cv) const |
| int | find (unsigned int Start_iv, Regex &Pat_Cv) const |
| unsigned | numLines () const |
| const string & | fileName () const |
| unsigned | differentLine (const AsciiFile &File_Cv) const |
| bool | removeIfEmpty () |
Protected Member Functions | |
| bool | appendFile (const string &Name_Cv, std::vector< string > &Lines_Cr) |
| bool | appendFile (AsciiFile &File_Cv, std::vector< string > &Lines_Cr) |
Protected Attributes | |
| bool | BackupCreated_b |
| string | BackupExtension_C |
| std::vector< string > | Lines_C |
| string | Name_C |
| AsciiFile::AsciiFile | ( | bool | CreateBackup_bv = false, |
|
| const char * | BackupExt_Cv = ".orig" | |||
| ) |
| AsciiFile::AsciiFile | ( | const string & | Name_Cv, | |
| bool | CreateBackup_bv = false, |
|||
| const char * | BackupExt_Cv = ".orig" | |||
| ) |
References loadFile().
| AsciiFile::AsciiFile | ( | const char * | Name_Cv, | |
| bool | CreateBackup_bv = false, |
|||
| const char * | BackupExt_Cv = ".orig" | |||
| ) |
References loadFile().
| AsciiFile::~AsciiFile | ( | ) |
| bool AsciiFile::insertFile | ( | AsciiFile & | File_Cv, | |
| unsigned int | BeforeLine_iv = 0 | |||
| ) |
References appendFile(), DBG, Lines_C, and numLines().
| bool AsciiFile::appendFile | ( | AsciiFile & | File_Cv | ) |
| bool AsciiFile::insertFile | ( | const string & | Name_Cv, | |
| unsigned int | BeforeLine_iv = 0 | |||
| ) |
References appendFile(), and Lines_C.
| bool AsciiFile::appendFile | ( | const string & | Name_Cv | ) |
References appendFile(), DBG, and Lines_C.
| bool AsciiFile::loadFile | ( | const string & | Name_Cv | ) |
References appendFile(), Lines_C, Name_C, and y2milestone.
Referenced by AsciiFile(), and storage::EtcRaidtab::updateMdadmFile().
| bool AsciiFile::updateFile | ( | ) |
References BackupCreated_b, BackupExtension_C, DBG, storage::SystemCmd::execute(), Lines_C, and Name_C.
Referenced by storage::EtcFstab::flush(), and storage::EtcRaidtab::updateMdadmFile().
| void AsciiFile::append | ( | const string & | Line_Cv | ) |
References DBG, Lines_C, and storage::removeLastIf().
Referenced by storage::EtcFstab::flush(), and insert().
| void storage::AsciiFile::append | ( | const std::list< string > & | Lines_Cv | ) |
| void AsciiFile::insert | ( | unsigned int | Before_iv, | |
| const string & | Line_Cv | |||
| ) |
References append(), DBG, Lines_C, and storage::removeLastIf().
Referenced by storage::EtcFstab::flush(), and replace().
| void AsciiFile::remove | ( | unsigned int | Start_iv, | |
| unsigned int | Cnt_iv | |||
| ) |
Referenced by storage::EtcFstab::flush(), and storage::EtcRaidtab::removeEntry().
| void AsciiFile::replace | ( | unsigned int | Start_iv, | |
| unsigned int | Cnt_iv, | |||
| const string & | Line_Cv | |||
| ) |
References insert().
| void storage::AsciiFile::replace | ( | unsigned int | Start_iv, | |
| unsigned int | Cnt_iv, | |||
| const std::list< string > & | Line_Cv | |||
| ) |
| const string & AsciiFile::operator[] | ( | unsigned int | Index_iv | ) | const |
References Lines_C.
| string & AsciiFile::operator[] | ( | unsigned int | Index_iv | ) |
References Lines_C.
| int AsciiFile::find | ( | unsigned int | Start_iv, | |
| const string & | Pat_Cv | |||
| ) | const |
| int storage::AsciiFile::find | ( | unsigned int | Start_iv, | |
| Regex & | Pat_Cv | |||
| ) | const |
| unsigned AsciiFile::numLines | ( | ) | const |
References Lines_C.
Referenced by appendFile(), differentLine(), insertFile(), storage::Storage::logProcData(), storage::ProcPart::ProcPart(), and storage::searchFile().
| const string & AsciiFile::fileName | ( | ) | const |
| unsigned AsciiFile::differentLine | ( | const AsciiFile & | File_Cv | ) | const |
References numLines().
| bool AsciiFile::removeIfEmpty | ( | ) |
| bool storage::AsciiFile::appendFile | ( | const string & | Name_Cv, | |
| std::vector< string > & | Lines_Cr | |||
| ) | [protected] |
| bool storage::AsciiFile::appendFile | ( | AsciiFile & | File_Cv, | |
| std::vector< string > & | Lines_Cr | |||
| ) | [protected] |
bool storage::AsciiFile::BackupCreated_b [protected] |
Referenced by updateFile().
string storage::AsciiFile::BackupExtension_C [protected] |
Referenced by updateFile().
std::vector<string> storage::AsciiFile::Lines_C [protected] |
Referenced by append(), appendFile(), find(), insert(), insertFile(), loadFile(), numLines(), operator[](), remove(), removeIfEmpty(), saveToFile(), and updateFile().
string storage::AsciiFile::Name_C [protected] |
Referenced by fileName(), loadFile(), removeIfEmpty(), and updateFile().
1.5.5