Wittyshare  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WsFileNode.h
Go to the documentation of this file.
1 /*
2  *
3  * @file WsfileNode.h
4  *
5  * @brief A file Node
6  *
7  * @version 1.0
8  * @date 01.07.2011 16:37:11
9  *
10  * Author: Benoit Daccache, ben.daccache@gmail.com
11  *
12  */
13 #ifndef WS_FILE_NODE_H__
14 #define WS_FILE_NODE_H__
15 #include "WsNode.h"
16 #include "WsDirNode.h"
18 
23 class WsFileNode: public WsNode {
24 public:
25 
31  WsFileNode(const path& fullPath, const path& rootPath);
32 
33  WsFileNode();
34 
35 
43  bool isAllowed(const std::set<string>& gids);
44 
49  const set<string> getGroups();
50 
54  bool getDisplayInMenu();
55 
60  const string getPublishDate();
61 
66  const string getAuthor();
67 
71  const uintmax_t getSize();
72 
76  bool isDirectory();
77 
81  bool isRegularFile();
82 
83 
84 };
85 
86 #endif
bool isRegularFile()
Definition: WsFileNode.cpp:78
A dir node.
Reprensents a File on disk.
Definition: WsFileNode.h:23
bool isAllowed(const std::set< string > &gids)
Return true or false whether the gids are allowed or no.
Definition: WsFileNode.cpp:34
Represents a node on disk.
Definition: WsNode.h:27
Node structure, must be inherited.
bool isDirectory()
Definition: WsFileNode.cpp:73
const uintmax_t getSize()
return the size of the file
Definition: WsFileNode.cpp:68
const string getAuthor()
returns the author name.
Definition: WsFileNode.cpp:63
bool getDisplayInMenu()
returns true if the item should be displayed in the menu. This value is set in the configuration file...
Definition: WsFileNode.cpp:49
const set< string > getGroups()
returns the list of the groups allowed to access this node
Definition: WsFileNode.cpp:24
const string getPublishDate()
returns the publish date of the file
Definition: WsFileNode.cpp:57