All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
OSXFileIO.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "IFileIO.h"
6 #include "Types.h"
7 #include <set>
8 #include <vector>
9 #include <string>
10 #include <iostream>
11 #include <sys/stat.h>
12 
13 namespace Eegeo
14 {
15  namespace OSX
16  {
18  {
19  public:
20  OSXFileIO(const std::string& basePath);
21  virtual ~OSXFileIO();
22 
23  virtual bool OpenFile(std::fstream& stream, size_t& size, const std::string& name, std::ios_base::openmode mode=std::ifstream::in);
24  virtual bool WriteFile(const Byte* data, size_t size, const std::string& name, std::ios_base::openmode mode=std::ifstream::out);
25  virtual bool DeleteFile(const std::string& name);
26  virtual bool Exists(const std::string& name);
27  virtual bool TryStat(const std::string& name, Helpers::FileStat& out_filestat);
28  virtual std::string GetAppFilePathname(const std::string& filename);
29  private:
30  std::string m_basePath;
31  std::string m_localDataFolderPath;
32  };
33  }
34 }