summaryrefslogtreecommitdiff
path: root/lib/common/Utils.h
blob: 5da84d9a54c0c28634105b57cf3b88c35a8acab2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// --------------------------------------------------------------------------
//
// File
//		Name:    Utils.h
//		Purpose: Utility function
//		Created: 2003/07/31
//
// --------------------------------------------------------------------------

#ifndef UTILS__H
#define UTILS__H

#include <string>
#include <vector>

#include "MemLeakFindOn.h"

void SplitString(const std::string &String, char SplitOn, std::vector<std::string> &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