#include "c4group/CStdFile.h"
Go to the source code of this file.
Classes | |
struct | C4GroupHeader |
struct | C4GroupEntryCore |
class | C4GroupEntry |
class | C4Group |
Macros | |
#define | C4GRP_DISABLE_REWINDWARN ; |
#define | C4GRP_ENABLE_REWINDWARN ; |
#define | C4GroupFileID "RedWolf Design GrpFolder" |
Functions | |
bool | C4Group_TestIgnore (const char *filename) |
void | C4Group_SetTempPath (const char *path) |
const char * | C4Group_GetTempPath () |
void | C4Group_SetSortList (const char **sort_list) |
void | C4Group_SetProcessCallback (bool(*callback)(const char *, int)) |
bool | C4Group_IsGroup (const char *filename) |
bool | C4Group_CopyItem (const char *source, const char *target, bool no_sorting=false, bool reset_attributes=false) |
bool | C4Group_MoveItem (const char *source, const char *target, bool no_sorting=false) |
bool | C4Group_DeleteItem (const char *item_name, bool do_recycle=false) |
bool | C4Group_PackDirectoryTo (const char *filename, const char *to_filename) |
bool | C4Group_PackDirectory (const char *filename) |
bool | C4Group_UnpackDirectory (const char *filename) |
bool | C4Group_ExplodeDirectory (const char *filename) |
bool | C4Group_ReadFile (const char *filename, char **data, size_t *size) |
Variables | |
const int | C4GroupFileVer1 = 1 |
const int | C4GroupFileVer2 = 2 |
const int | C4GroupMaxError = 100 |
const int32_t | C4GroupSwapThreshold = 10 * 1024 * 1024 |
const char * | C4CFN_FLS [] |
struct C4GroupHeader |
bool C4Group_CopyItem | ( | const char * | source, |
const char * | target, | ||
bool | no_sorting = false , |
||
bool | reset_attributes = false |
||
) |
Definition at line 115 of file C4Group.cpp.
References _MAX_PATH, _MAX_PATH_LEN, C4Group_TempPath, C4Group::Close(), CopyItem(), CreateItem(), DirectorySeparator, EraseItem(), C4Group::Extract(), GetFilename(), GetParentPath(), ItemExists(), ItemIdentical(), MakeTempFilename(), C4Group::Move(), C4Group::Open(), SAppend(), SCopy(), C4Group::SetNoSort(), and SLen().
Referenced by C4Network2Res::Derive(), C4MusicFile::ExtractFile(), C4Network2Res::GetStandalone(), C4Network2Res::OptimizeStandalone(), C4ControlJoinPlayer::PreRec(), C4MessageInput::ProcessCommand(), C4Network2::RetrieveScenario(), C4Player::Save(), C4PlayerList::Save(), C4Console::SaveScenario(), and C4Playback::StreamToRecord().
bool C4Group_DeleteItem | ( | const char * | item_name, |
bool | do_recycle = false |
||
) |
Definition at line 255 of file C4Group.cpp.
References _MAX_PATH_LEN, C4Group::Close(), C4Group::DeleteEntry(), EraseItem(), EraseItemSafe(), GetFilename(), GetParentPath(), ItemExists(), and C4Group::Open().
Referenced by C4StartupScenSelDlg::DeleteConfirm(), and C4StartupPlrSelDlg::OnDelBtnConfirm().
bool C4Group_ExplodeDirectory | ( | const char * | filename | ) |
Definition at line 470 of file C4Group.cpp.
References C4Group_TestIgnore(), C4Group_UnpackDirectory(), and ForEachFile().
Referenced by C4Group_ApplyUpdate(), and ProcessGroup().
const char* C4Group_GetTempPath | ( | ) |
Definition at line 87 of file C4Group.cpp.
References C4Group_TempPath.
Referenced by C4Surface::SavePNG().
bool C4Group_IsGroup | ( | const char * | filename | ) |
Definition at line 104 of file C4Group.cpp.
References C4Group::Close(), and C4Group::Open().
Referenced by C4MainMenu::ActivateSavegame(), C4Group_ApplyUpdate(), and C4ScenarioListLoader::Entry::RenameTo().
bool C4Group_MoveItem | ( | const char * | source, |
const char * | target, | ||
bool | no_sorting = false |
||
) |
Definition at line 182 of file C4Group.cpp.
References _MAX_PATH, _MAX_PATH_LEN, C4Group_TempPath, C4Group::Close(), CreateItem(), C4Group::DeleteEntry(), DirectorySeparator, EraseItem(), C4Group::Extract(), GetFilename(), GetParentPath(), ItemExists(), ItemIdentical(), MakeTempFilename(), C4Group::Move(), MoveItem(), C4Group::Open(), SAppend(), SCopy(), C4Group::SetNoSort(), and SLen().
Referenced by C4ScenarioListLoader::Entry::RenameTo(), and C4Player::Save().
bool C4Group_PackDirectory | ( | const char * | filename | ) |
Definition at line 371 of file C4Group.cpp.
References _MAX_PATH, _MAX_PATH_LEN, C4Group_PackDirectoryTo(), EraseDirectory(), MakeTempFilename(), RenameFile(), and SCopy().
Referenced by C4Network2Res::GetStandalone(), ProcessGroup(), and C4Record::Stop().
bool C4Group_PackDirectoryTo | ( | const char * | filename, |
const char * | to_filename | ||
) |
Definition at line 292 of file C4Group.cpp.
References _MAX_PATH, _MAX_PATH_LEN, C4Group::Add(), C4Group_ProcessCallback, C4Group_SortList, C4Group_TempPath, C4Group_TestIgnore(), C4Group::Close(), DirectoryExists(), EraseFile(), EraseItem(), FileExists(), GetFilename(), MakeTempFilename(), C4Group::Move(), C4Group::Open(), DirectoryIterator::Reset(), SAppend(), SCopy(), and C4Group::SortByList().
Referenced by C4ControlJoinPlayer::C4ControlJoinPlayer(), C4Group_PackDirectory(), C4Network2Res::GetStandalone(), ProcessGroup(), and C4Console::SaveScenario().
bool C4Group_ReadFile | ( | const char * | filename, |
char ** | data, | ||
size_t * | size | ||
) |
Definition at line 491 of file C4Group.cpp.
References _MAX_PATH_LEN, C4Group::AccessEntry(), C4Group::Close(), GetFilename(), GetParentPath(), C4Group::Open(), and C4Group::Read().
Referenced by C4MusicFileSDL::Play().
void C4Group_SetProcessCallback | ( | bool(*)(const char *, int) | callback | ) |
Definition at line 64 of file C4Group.cpp.
References C4Group_ProcessCallback.
Referenced by C4Application::DoInit().
void C4Group_SetSortList | ( | const char ** | sort_list | ) |
Definition at line 69 of file C4Group.cpp.
References C4Group_SortList.
Referenced by C4Application::DoInit(), main(), and ProcessGroup().
void C4Group_SetTempPath | ( | const char * | path | ) |
Definition at line 74 of file C4Group.cpp.
References _MAX_PATH, AppendBackslash(), C4Group_TempPath, and SCopy().
Referenced by C4Application::DoInit().
bool C4Group_TestIgnore | ( | const char * | filename | ) |
Definition at line 92 of file C4Group.cpp.
References C4Group_Ignore, GetFilename(), and SIsModule().
Referenced by C4Group_ExplodeDirectory(), C4Group_PackDirectoryTo(), DirContainsScenarios(), and C4ScenarioListLoader::RegularFolder::DoLoadContents().
bool C4Group_UnpackDirectory | ( | const char * | filename | ) |
Definition at line 401 of file C4Group.cpp.
References _MAX_PATH, _MAX_PATH_LEN, C4Group_ProcessCallback, C4Group::Close(), CreatePath(), DirectoryExists(), EraseItem(), C4Group::Extract(), FileExists(), GetParentPath(), MakeTempFilename(), C4Group::Open(), RenameFile(), and SCopy().
Referenced by C4Group_ExplodeDirectory(), C4UpdatePackage::Execute(), C4Language::Init(), ProcessGroup(), C4Network2::RetrieveScenario(), C4Record::Start(), and C4Playback::StreamToRecord().
|
extern |
Definition at line 32 of file C4Group.cpp.
Referenced by C4Application::DoInit(), and main().
const int C4GroupFileVer1 = 1 |
Definition at line 55 of file C4Group.h.
Referenced by C4Group::Close(), and C4Group::OpenAsChild().
const int C4GroupFileVer2 = 2 |
Definition at line 56 of file C4Group.h.
Referenced by C4Group::Close(), and C4Group::OpenAsChild().
const int32_t C4GroupSwapThreshold = 10 * 1024 * 1024 |
Definition at line 60 of file C4Group.h.
Referenced by C4Group::Save().