Fission FSN
Loading...
Searching...
No Matches
fsIFile.h
Go to the documentation of this file.
1/********************************************************************
2*
3* File: fsIFile.h
4*
5* Purpose: Interface for file operations
6*
7*********************************************************************/
8
9#ifndef fsIFilehdr
10#define fsIFilehdr
11
12#include <vector>
13
14#include "fsBaseTypes.h"
15
16class fsCResourceName;
17class fsStr;
18
20{
23 friend class fsCHardware;
24
25public:
26
27#ifdef fsInAppPurchase
28 static void preLoadODR(const fsCResourceName& pFilename);
29#endif
30
32
33 static fsStr fullPathGet(const fsCResourceName& pFilename);
34 static fsStr bytesGetFromCompressedFile(const fsCResourceName& pFilename);
35 static fsStr strGetFromFile(const fsCResourceName& pFilename);
36 static void strWriteToFile(const fsCResourceName& pFilename, const fsStr& pStr);
37
38 static std::vector<fsStr> textFileReadToVector(const fsCResourceName& pFileName);
39
40 static fsBool fileExistsGet(const fsCResourceName& pFileName);
41 static fsBool fileDelete(const fsCResourceName& pFileName);
42
43 static fsBool folderCreate(const fsCResourceName& pFolderName);
44 static fsBool folderIs(const fsCResourceName& pFolderName);
45
46 static void fileCopy(const fsCResourceName& pSource, const fsCResourceName& pDestination);
47 static fsBool folderDelete(const fsCResourceName& pFolderName);
48
49protected:
50
51private:
52
53 // Use sparingly - all file work must use fsCResourceName except fsCResourceName itself or
54 // it ends up calling itself
55 static fsBool rawFileNameExistsCheck(const fsStr& pFileName);
56 static void systemFolderCreate(const fsStr& pFolderName);
57 static void systemFolderDelete(const fsStr& pFolderName);
58};
59
60#endif
Definition fsCResourceName.h:32
Definition fsIFile.h:20
static fsStr bytesGetFromCompressedFileBinary(const fsCResourceName &pFilename)
Definition fsIFile.cpp:30
static std::vector< fsStr > textFileReadToVector(const fsCResourceName &pFileName)
Definition fsIFile.cpp:55
static fsStr bytesGetFromCompressedFile(const fsCResourceName &pFilename)
Definition fsIFile.cpp:40
static void fileCopy(const fsCResourceName &pSource, const fsCResourceName &pDestination)
Definition fsIFile.cpp:90
static fsBool folderIs(const fsCResourceName &pFolderName)
Definition fsIFile.cpp:85
static fsBool folderDelete(const fsCResourceName &pFolderName)
Definition fsIFile.cpp:102
friend class fsCResourceNamePathAdjuster
Definition fsIFile.h:21
static fsBool folderCreate(const fsCResourceName &pFolderName)
Definition fsIFile.cpp:97
static fsStr strGetFromFile(const fsCResourceName &pFilename)
Definition fsIFile.cpp:45
static fsStr fullPathGet(const fsCResourceName &pFilename)
Definition fsIFile.cpp:35
static void preLoadODR(const fsCResourceName &pFilename)
Definition fsIFile.cpp:24
friend class fsIResourceNamePathAdjuster
Definition fsIFile.h:22
static fsBool fileExistsGet(const fsCResourceName &pFileName)
Definition fsIFile.cpp:75
static void strWriteToFile(const fsCResourceName &pFilename, const fsStr &pStr)
Definition fsIFile.cpp:50
friend class fsCHardware
Definition fsIFile.h:23
static fsBool fileDelete(const fsCResourceName &pFileName)
Definition fsIFile.cpp:80
Definition fsStr.h:23
bool fsBool
Definition fsBaseTypes.h:26