Web framework C++  2.0.0
Simple web framework on c++ designed to easily create web pages, etc
fs_folder.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <list>
4 #include "fs_component.h"
5 
11 class FsFolder : public FsComponent {
12  std::string name;
13 protected:
14  std::list<FsComponent *> children;
15 public:
19  ~FsFolder() override;
20 
27  explicit FsFolder(std::string & name);
28 
35  explicit FsFolder(const char * name);
36 
43  std::string getName() override;
44 
50  std::string getFileContent() override;
51 
61  std::string findFileAndGetContent(std::string & filePath) override;
62 
69  void add(FsComponent * component) override;
70 
77  void remove(FsComponent * component) override;
78 
85  bool isComposite() override;
86 };
void add(FsComponent *component) override
std::string getName() override
std::list< FsComponent * > children
Definition: fs_folder.h:14
Interface for filesystem entity - file or path. Composite template.
Definition: fs_component.h:12
bool isComposite() override
Representation of folder in filesystem.
Definition: fs_folder.h:11
~FsFolder() override
std::string getFileContent() override
std::string findFileAndGetContent(std::string &filePath) override
FsFolder(std::string &name)