Wittyshare  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WsDirNode.h
Go to the documentation of this file.
1 
13 #ifndef WS_DIR_NODE_H__
14 #define WS_DIR_NODE_H__
15 
16 #include "WsNode.h"
19 
20 #include <iostream>
21 
25 class WsDirNode: public WsNode {
26 public:
32  WsDirNode(const path& fullPath, const path& rootPath);
33 
34  WsDirNode();
35  ~WsDirNode();
36 
40  bool isAllowed(const std::set<string>& gids);
41 
45  bool getDisplayInParent();
46 
51  set<string> getGroups();
52 
57  std::vector<std::string> getResource(ResourceType t, bool recurse = false);
58 
59  void setResources(WsNodeResources* resources);
60 
64  bool isDirectory();
65 
69  bool isRegularFile();
70 
71  /* @brief if
72  * the global property dir_size is set to true, the number of items in the node is returned (one level), otherwise 0
73  **/
74  const uintmax_t getSize();
75 
76 private:
81 
82 };
83 #endif
Global properties.
std::vector< std::string > getResource(ResourceType t, bool recurse=false)
get the resource of a node Not implemented yet
Definition: WsDirNode.cpp:69
Reprensents a Directory on disk.
Definition: WsDirNode.h:25
bool isDirectory()
return true
Definition: WsDirNode.cpp:86
Represents a node on disk.
Definition: WsNode.h:27
bool isAllowed(const std::set< string > &gids)
return true if one of the groups contained in gids has access to the node false otherwise If the node...
Definition: WsDirNode.cpp:41
Node structure, must be inherited.
bool getDisplayInParent()
Definition: WsDirNode.cpp:78
set< string > getGroups()
returns the list of the groups allowed to access this node
Definition: WsDirNode.cpp:36
WsNodeResources * m_resources
Definition: WsDirNode.h:80
void setResources(WsNodeResources *resources)
Definition: WsDirNode.cpp:73
const uintmax_t getSize()
returns the file size. If the Node is a WsDirNode, 0 is returned. if the global property dir_size is ...
Definition: WsDirNode.cpp:96
Node Resources.
bool isRegularFile()
return false
Definition: WsDirNode.cpp:91
Resources of a WsNode.