Ocular Engine
Directory.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_CORE_FILEIO_DIRECTORY__H__
19 #define __H__OCULAR_CORE_FILEIO_DIRECTORY__H__
20 
21 #include <string>
22 #include <vector>
23 
24 #include "File.hpp"
25 
26 //------------------------------------------------------------------------------------------
27 
32 namespace Ocular
33 {
38  namespace Core
39  {
43  class Directory : public File
44  {
45  public:
46 
51  Directory(std::string const path = "");
52  ~Directory();
53 
59  std::vector<Directory> getChildDirectories(bool recursive = false) const;
60 
66  std::vector<File> getChildFiles(bool recursive = false) const;
67 
76  void explore(bool const recursive = false);
77 
84  virtual bool create(bool createDirectories = false);
85 
86  protected:
87 
88  private:
89 
90  std::vector<Directory> m_ChildDirectories;
91  std::vector<File> m_ChildFiles;
92  };
93  }
97 }
102 OCULAR_REGISTER_TYPE_CUSTOM(Ocular::Core::Directory, "Directory");
103 
104 //------------------------------------------------------------------------------------------
105 
106 #endif
std::vector< Directory > getChildDirectories(bool recursive=false) const
Definition: Directory.cpp:86
void explore(bool const recursive=false)
Definition: Directory.cpp:120
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Directory(std::string const path="")
Definition: Directory.cpp:71
virtual bool create(bool createDirectories=false)
Definition: Directory.cpp:150
Definition: Directory.hpp:43
std::vector< File > getChildFiles(bool recursive=false) const
Definition: Directory.cpp:103
Definition: File.hpp:41