Web framework C++
2.0.0
Simple web framework on c++ designed to easily create web pages, etc
|
Representation of folder in filesystem. More...
#include <fs_folder.h>
Public Member Functions | |
~FsFolder () override | |
FsFolder (std::string &name) | |
FsFolder (const char *name) | |
std::string | getName () override |
std::string | getFileContent () override |
std::string | findFileAndGetContent (std::string &filePath) override |
void | add (FsComponent *component) override |
void | remove (FsComponent *component) override |
bool | isComposite () override |
![]() | |
virtual | ~FsComponent ()=default |
Protected Attributes | |
std::list< FsComponent * > | children |
Representation of folder in filesystem.
This class is intended to represent a folder in filesystem hierarchy
|
override |
delete all inner hierarchy
|
explicit |
Create a FsFolder object with specified name
name | name of current folder as string |
|
explicit |
Create a FsFolder object with specified name
name | name of current folder as const char * |
|
overridevirtual |
Add FsComponent to current entity's children
component | FsComponent object - file or folder |
Implements FsComponent.
|
overridevirtual |
recursively find a file with such path in folder hierarchy and read it's content
filePath | file path of file relatively root folder |
Implements FsComponent.
|
overridevirtual |
RuntimeException,if | this component was not a file |
Implements FsComponent.
|
overridevirtual |
|
overridevirtual |
Check, if current entity is composite and have children
Implements FsComponent.
|
overridevirtual |
Remove FsComponent from current entity's children
component | FsComponent object - file or folder |
Implements FsComponent.
|
protected |