From 99f8ce096bc5569adbfea1911dbcda24c28d8d8b Mon Sep 17 00:00:00 2001 From: Ben Summers Date: Fri, 14 Oct 2005 08:50:54 +0000 Subject: Box Backup 0.09 with a few tweeks --- lib/common/Utils.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 lib/common/Utils.h (limited to 'lib/common/Utils.h') diff --git a/lib/common/Utils.h b/lib/common/Utils.h new file mode 100755 index 00000000..5da84d9a --- /dev/null +++ b/lib/common/Utils.h @@ -0,0 +1,36 @@ +// -------------------------------------------------------------------------- +// +// File +// Name: Utils.h +// Purpose: Utility function +// Created: 2003/07/31 +// +// -------------------------------------------------------------------------- + +#ifndef UTILS__H +#define UTILS__H + +#include +#include + +#include "MemLeakFindOn.h" + +void SplitString(const std::string &String, char SplitOn, std::vector &rOutput); + +#ifdef SHOW_BACKTRACE_ON_EXCEPTION + void DumpStackBacktrace(); +#endif + +bool FileExists(const char *Filename, int64_t *pFileSize = 0, bool TreatLinksAsNotExisting = false); + +enum +{ + ObjectExists_NoObject = 0, + ObjectExists_File = 1, + ObjectExists_Dir = 2 +}; +int ObjectExists(const char *Filename); + +#include "MemLeakFindOff.h" + +#endif // UTILS__H -- cgit v1.2.3