forked from MetaCipher/the-sdl-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FileManager.h
38 lines (27 loc) · 950 Bytes
/
FileManager.h
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
37
38
//==============================================================================
/*
Class for loading files and reading directories
Note: To use iOS functions, set your file type to Objective-C++
3/18/2014
SDLTutorials.com
Tim Jones
*/
//==============================================================================
#ifndef __FILEMANAGER_H__
#define __FILEMANAGER_H__
#include <string>
#include <map>
#include <vector>
#include <iostream>
#include <fstream>
#define DIR_SEPARATOR "/"
class FileManager {
public:
static bool SetContents(std::string Filename, std::string Content, bool Relative = true);
static std::string GetContents(std::string Filename, bool Relative = true);
static std::vector<std::string> GetFilesInFolder(std::string Folder);
static std::string GetCWD();
static std::string GetFilenameWithoutExt(std::string Filename);
static std::string GetFilenameExt(std::string Filename);
};
#endif