FSNode.hpp
Go to the documentation of this file.
1 
7 #include <etk/types.hpp>
8 
9 #pragma once
10 
11 #include <etk/os/FSNodeRight.hpp>
15 #define MAX_FILE_NAME (10240)
16 
17 //http://developer.android.com/guide/topics/data/data-storage.html
18 
19 
20 #ifdef __TARGET_OS__Android
21  #define HAVE_ZIP_DATA
22 #endif
23 
24 #ifdef __TARGET_OS__Windows
25  #define HAVE_ZIP_DATA
26 #endif
27 
28 
29 #ifdef HAVE_ZIP_DATA
30 namespace etk {
31  class ArchiveContent;
32 }
33 #endif
34 namespace etk {
39  void setArgZero(const std::string& _val);
45  std::string simplifyPath(std::string _input);
50  std::string FSNodeGetApplicationName();
54  enum typeNode {
63  };
65  std::ostream& operator <<(std::ostream &_os, const enum etk::typeNode &_obj);
69  enum seekNode{
73  };
77  enum FSNType {
79  // user might done abstraction ==> acces of the sdcard when possible ...
82 
83  // depend on case
84  // - PC : ~/
85  // - Android : /sdcard/
86  // - Apple : ????
88 
89  // depend of the case
90  // - PC : /usr/shared/programName/
91  // - Android : Internal at the executable file (pointer on static area)
92  // - Apple : Internal at the executable file
94 
95  // depend on case
96  // - PC : ~/.local/programName/
97  // - Android : /data/data/programName/files/
98  // - Apple : ????
100 
101  // depend on case
102  // - PC : ~/.programName/cache/
103  // - Android : /data/data/programName/cache/
104  // - Apple : ????
106 
107  // depend on case
108  // - try on USER_DATA:/theme/themeName/xxx
109  // - try on DATA:/theme/themeName/xxx
110  // and jump to the default theme file
111  // - try on USER_DATA:/theme/default/xxx
112  // - try on DATA:/theme/default/xxx
115  };
117  std::ostream& operator <<(std::ostream &_os, const enum etk::FSNType &_obj);
118 
119  /*
120  note : The filename can be
121  Direct mode:
122  DIRECT:/sdfsdfsdf/
123  /XX ==> for Linux / Mac / Android
124  [a-zA-Z]:/xxx ==> for Windows
125 
126  Data mode:
127  DATA:folder/File.ccc
128  {libName}DATA:folder/File.ccc ==> try to read in appl data and in next in "libName" lib data folder
129  {@libName}DATA:folder/File.ccc ==> try to read ONLY in "libName" lib data folder
130 
131  User data mode:
132  USERDATA:folder/File.ccc
133  {libName}USERDATA:folder/File.ccc
134  {@libName}USERDATA:folder/File.ccc
135 
136  Cache Data:
137  CACHE:folder/File.ccc
138 
139  Theme data:
140  THEME:folder/file.xxx
141  THEME:GUI:folder/file.xxx
142  {libName}THEME:GUI:folder/file.xxx
143  {@libName}THEME:GUI:folder/file.xxx
144 
145  Get the root folder:
146  ROOT:
147  /
148  [a-zA-Z]: ==> create more risk ...
149 
150  Get the Home folder:
151  HOME:
152  ~
153 
154  Get the relative folder:
155  REL:
156  ./
157  */
163  class FSNode {
164  private:
165  std::string m_libSearch;
166  std::string m_userFileName;
167  std::string m_systemFileName;
168  enum FSNType m_type;
169  enum typeNode m_typeNode;
170  etk::FSNodeRight m_rights;
171  // specific when file Access :
172  FILE * m_PointerFile;
173  uint64_t m_timeCreate;
174  uint64_t m_timeModify;
175  uint64_t m_timeAccess;
176  uint32_t m_idOwner;
177  uint32_t m_idGroup;
178  public:
183  FSNode(const std::string& _path = "~");
184  #if __CPP_VERSION__ >= 2011
185  FSNode(const std::u32string& _path);
186  #endif
187 
191  ~FSNode();
192  private:
196  void generateFileSystemPath();
200  void updateFileSystemProperty();
205  void privateSetName(std::string _newName);
206  #if __CPP_VERSION__ >= 2011
207  void privateSetName(const std::u32string& _newName);
208  #endif
209  private:
210  #ifdef HAVE_ZIP_DATA
211 
216  bool loadDataZip();
217  const etk::ArchiveContent* m_zipContent;
218  int32_t m_zipReadingOffset;
219  #endif
220  public:
226  bool exist() const {
227  return (m_typeNode!=etk::typeNode_unknow);
228  };
233  enum typeNode getNodeType() const {
234  return m_typeNode;
235  };
241  return m_rights;
242  };
249  bool setRight(etk::FSNodeRight _newRight);
256  void setName(const std::string& _newName);
257  #if __CPP_VERSION__ >= 2011
258  void setName(const std::u32string& _newName);
259  #endif
260 
264  std::string getFileSystemName() const;
265  #if __CPP_VERSION__ >= 2011
266  std::u32string getUFileSystemName() const;
267  #endif
268 
273  std::string getNameFolder() const;
274  #if __CPP_VERSION__ >= 2011
275  std::u32string getUNameFolder() const;
276  #endif
277 
282  std::string getName() const;
283  #if __CPP_VERSION__ >= 2011
284  std::u32string getUName() const;
285  #endif
286 
290  std::string getNameFile() const;
291  #if __CPP_VERSION__ >= 2011
292  std::u32string getUNameFile() const;
293  #endif
294 
299  std::string getRelativeFolder() const;
300  #if __CPP_VERSION__ >= 2011
301  std::u32string getURelativeFolder() const;
302  #endif
303 
308  bool touch();
315  bool move(const std::string& _path);
316  #if __CPP_VERSION__ >= 2011
317  bool move(const std::u32string& _path);
318  #endif
319 
323  enum FSNType getTypeAccess() const {
324  return m_type;
325  };
331  bool remove();
336  uint64_t timeCreated() const;
341  std::string timeCreatedString() const;
342  #if __CPP_VERSION__ >= 2011
343  std::u32string timeUCreatedString() const;
344  #endif
345 
349  uint64_t timeModified() const;
354  std::string timeModifiedString() const;
355  #if __CPP_VERSION__ >= 2011
356  std::u32string timeUModifiedString() const;
357  #endif
358 
362  uint64_t timeAccessed() const;
367  std::string timeAccessedString() const;
368  #if __CPP_VERSION__ >= 2011
369  std::u32string timeUAccessedString() const;
370  #endif
371 
376  const etk::FSNode& operator= (const etk::FSNode &_obj );
382  bool operator== (const etk::FSNode &_obj ) const;
388  bool operator!= (const etk::FSNode &_obj ) const;
395  friend std::ostream& operator <<( std::ostream &_os,const etk::FSNode &_obj);
396 
402  int64_t folderCount();
411  std::vector<etk::FSNode*> folderGetSubList(bool _showHidenFile = true,
412  bool _getFolderAndOther = true,
413  bool _getFile = true,
414  bool _temporaryFile = true);
423  std::vector<etk::FSNode*> folderGetSubList(bool _showHidenFile = true,
424  bool _getFolderAndOther = true,
425  bool _getFile = true,
426  const std::string& _filter = ".*");
434  std::vector<std::string> folderGetSub(bool _getFolder, bool _getFile, const std::string& _filter);
445  void folderGetRecursiveFiles(std::vector<std::string>& _output, bool _recursiveEnable=true);
446  #if __CPP_VERSION__ >= 2011
447  void folderGetRecursiveFiles(std::vector<std::u32string>& _output, bool _recursiveEnable=true);
448  #endif
449 
454  bool fileHasExtention();
459  std::string fileGetExtention();
460  #if __CPP_VERSION__ >= 2011
461  std::u32string fileUGetExtention();
462  #endif
463 
467  uint64_t fileSize();
473  bool fileOpenRead();
480  bool fileOpenWrite();
487  bool fileOpenAppend();
493  bool fileIsOpen();
499  bool fileClose();
506  char* fileGets(char* _elementLine, int64_t _maxData);
511  char fileGet();
518  bool fileGets(std::string& _output);
525  bool filePut(char _input);
532  bool filePuts(const std::string& _input);
540  int64_t fileRead(void* _data, int64_t _blockSize, int64_t _nbBlock);
548  int64_t fileWrite(const void* _data, int64_t _blockSize, int64_t _nbBlock);
549  // TODO: etk::FSNode& operator<< (const std::ostream& _data);
556  etk::FSNode& operator<< (const std::stringstream& _data);
558  etk::FSNode& operator<< (const std::string& _data);
560  etk::FSNode& operator<< (const char* _data);
562  etk::FSNode& operator<< (const int32_t _data);
564  etk::FSNode& operator<< (const uint32_t _data);
566  etk::FSNode& operator<< (const float _data);
571  int64_t fileTell();
579  bool fileSeek(long int _offset, enum etk::seekNode _origin);
583  void fileFlush();
588  template<typename T> std::vector<T> fileReadAll() {
589  std::vector<T> value;
590  value.resize(fileSize());
591  fileRead(&value[0], sizeof(T), fileSize()/sizeof(T));
592  return value;
593  }
598  std::string fileReadAllString() {
599  std::string value;
600  value.resize(fileSize());
601  fileRead(&value[0], sizeof(char), fileSize()/sizeof(char));
602  return value;
603  }
604  #if __CPP_VERSION__ >= 2011
605  std::u32string fileReadAllU32String() {
606  return utf8::convertUnicode(fileReadAllString());
607  }
608  #endif
609 
613  template<typename T>
614  void fileWriteAll(const std::vector<T>& _value) {
615  fileWrite(static_cast<const void*>(&(_value[0])), sizeof(T), _value.size()/sizeof(T));
616  }
621  void fileWriteAll(const std::string& _value) {
622  fileWrite(static_cast<const void*>(&(_value[0])), sizeof(char), _value.size()/sizeof(char));
623  }
624  #if __CPP_VERSION__ >= 2011
625  void fileWriteAll(const std::u32string& _value) {
626  fileWriteAll(u32char::convertToUtf8(_value));
627  }
628  #endif
629  private:
634  void sortElementList(std::vector<etk::FSNode *>& _list);
635  };
637  std::ostream& operator <<(std::ostream &_os, const etk::FSNode &_obj);
638 
644  void setBaseFolderData(const char* _folder, const char* _applName=nullptr);
649  void setBaseFolderDataUser(const char* _folder);
654  void setBaseFolderCache(const char* _folder);
659  void initDefaultFolder(const char* _applName);
664  std::string getUserHomeFolder();
665  #if __CPP_VERSION__ >= 2011
666  std::u32string getUUserHomeFolder();
667  #endif
668 
672  std::string getUserRunFolder();
673  #if __CPP_VERSION__ >= 2011
674  std::u32string getUUserRunFolder();
675  #endif
676 
677  namespace theme {
678  // TODO : Add an INIT ...
684  void setName(const std::string& _refName, const std::string& _folderName);
685  #if __CPP_VERSION__ >= 2011
686  void setName(const std::u32string& _refName, const std::u32string& _folderName);
688  #endif
689 
694  std::string getName(const std::string& _refName);
695  #if __CPP_VERSION__ >= 2011
696  std::u32string getName(const std::u32string& _refName);
698  #endif
699 
704  void setNameDefault(const std::string& _refName, const std::string& _folderName);
705  #if __CPP_VERSION__ >= 2011
706  void setNameDefault(const std::u32string& _refName, const std::u32string& _folderName);
708  #endif
709 
714  std::string getNameDefault(const std::string& _refName);
715  #if __CPP_VERSION__ >= 2011
716  std::u32string getNameDefault(const std::u32string& _refName);
718  #endif
719 
723  std::vector<std::string> list();
724  #if __CPP_VERSION__ >= 2011
725  std::vector<std::u32string> listU();
727  #endif
728  };
729 
736  bool FSNodeRemove(const std::string& _path);
737  #if __CPP_VERSION__ >= 2011
738  bool FSNodeRemove(const std::u32string& _path);
739  #endif
740 
746  int64_t FSNodeGetCount(const std::string& _path);
747  #if __CPP_VERSION__ >= 2011
748  int64_t FSNodeGetCount(const std::u32string& _path);
749  #endif
750 
758  bool FSNodeCreate(const std::string& _path, etk::FSNodeRight _right, enum etk::typeNode _type=etk::typeNode_folder);
759  #if __CPP_VERSION__ >= 2011
760  bool FSNodeCreate(const std::u32string& _path, etk::FSNodeRight _right, enum etk::typeNode _type=etk::typeNode_folder);
761  #endif
762 
768  bool FSNodeExist(const std::string& _path);
769  #if __CPP_VERSION__ >= 2011
770  bool FSNodeExist(const std::u32string& _path);
771  #endif
772 
779  bool FSNodeMove(const std::string& _path1, const std::string& _path2);
780  #if __CPP_VERSION__ >= 2011
781  bool FSNodeMove(const std::u32string& _path1, const std::u32string& _path2);
782  #endif
783 
789  etk::FSNodeRight FSNodeGetRight(const std::string& _path);
790  #if __CPP_VERSION__ >= 2011
791  etk::FSNodeRight FSNodeGetRight(const std::u32string& _path);
792  #endif
793 
799  enum etk::typeNode FSNodeGetType(const std::string& _path);
800  #if __CPP_VERSION__ >= 2011
801  enum etk::typeNode FSNodeGetType(const std::u32string& _path);
802  #endif
803 
809  uint64_t FSNodeGetTimeCreated(const std::string& _path);
810  #if __CPP_VERSION__ >= 2011
811  uint64_t FSNodeGetTimeCreated(const std::u32string& _path);
812  #endif
813 
819  uint64_t FSNodeGetTimeModified(const std::string& _path);
820  #if __CPP_VERSION__ >= 2011
821  uint64_t FSNodeGetTimeModified(const std::u32string& _path);
822  #endif
823 
829  uint64_t FSNodeGetTimeAccessed(const std::string& _path);
830  #if __CPP_VERSION__ >= 2011
831  uint64_t FSNodeGetTimeAccessed(const std::u32string& _path);
832  #endif
833 
839  bool FSNodeTouch(const std::string& _path);
840  #if __CPP_VERSION__ >= 2011
841  bool FSNodeTouch(const std::u32string& _path);
842  #endif
843 
850  bool FSNodeEcho(const std::string& _path, const std::string& _dataTowrite);
851  #if __CPP_VERSION__ >= 2011
852  bool FSNodeEcho(const std::u32string& _path, const std::u32string& _dataTowrite);
853  #endif
854 
861  bool FSNodeEchoAdd(const std::string& _path, const std::string& _dataTowrite);
862  #if __CPP_VERSION__ >= 2011
863  bool FSNodeEchoAdd(const std::u32string& _path, const std::u32string& _dataTowrite);
864  #endif
865 
870  void FSNodeHistory(const std::string& _path, int32_t _historyCount);
871  #if __CPP_VERSION__ >= 2011
872  void FSNodeHistory(const std::u32string& _path, int32_t _historyCount);
873  #endif
874 
879  std::string FSNodeReadAllData(const std::string& _path);
885  void FSNodeWriteAllData(const std::string& _path, const std::string& _data);
891  template<typename TTT> std::vector<TTT> FSNodeReadAllDataType(const std::string& _path) {
892  std::vector<TTT> out;
893  etk::FSNode node(_path);
894  if (node.fileOpenRead() == false) {
895  //TK_ERROR("can not open file : '" << node << "'");
896  return out;
897  }
898  uint64_t nbByte = node.fileSize();
899  out.resize(nbByte/sizeof(TTT));
900  if (out.size()*sizeof(TTT) != nbByte) {
901  //TK_WARNING("Error in reading the file missing some byte at the end ...");
902  }
903  node.fileRead(&out[0], sizeof(TTT), nbByte/sizeof(TTT));
904  node.fileClose();
905  return out;
906  }
912  template<typename TTT> void FSNodeWriteAllDataType(const std::string& _path, const std::vector<TTT>& _data) {
913  etk::FSNode node(_path);
914  if (node.fileOpenWrite() == false) {
915  //TK_ERROR("can not open file : '" << node << "'");
916  return;
917  }
918  node.fileWrite(&_data[0], sizeof(TTT), _data.size());
919  node.fileClose();
920  }
926  std::string FSNodeGetRealName(const std::string& _path);
927 
941  std::vector<std::string> FSNodeExplodeMultiplePath(const std::string& _path);
942 };
943 
944 
bool fileIsOpen()
Check if the current file is Open.
Element of the archive (with associated data)
Definition: Archive.hpp:20
bool fileOpenRead()
Open the file in Read mode.
uint64_t timeAccessed() const
Get the Accessed time of the File.
bool fileClose()
Close the curent file.
int64_t folderCount()
Count the number of subFolder in the curent Folder.
char * fileGets(char *_elementLine, int64_t _maxData)
Get the pointer on the start line and the next line (or null)
etk::FSNode folderGetParent()
Get the father node of this node.
etk::FSNodeRight FSNodeGetRight(const std::string &_path)
Simple access for : Get right of the current Node.
bool filePuts(const std::string &_input)
Write data on the file.
bool FSNodeMove(const std::string &_path1, const std::string &_path2)
Simple access for : chexk the exestance of an element.
uint64_t timeModified() const
Get the modifying time of the File.
void setName(const std::string &_newName)
Change the Node seeing (not rename the node, for this etk::FSNodeMove)
bool setRight(etk::FSNodeRight _newRight)
Set the specific right of the node.
char fileGet()
Get a unique data in the file.
void setBaseFolderDataUser(const char *_folder)
Set the user data folder (like /home/machin/.local/applName/ for linux)
std::vector< std::string > folderGetSub(bool _getFolder, bool _getFile, const std::string &_filter)
Get the List of all node inside a node (folder only)
bool FSNodeRemove(const std::string &_path)
Simple access for : Remove folder and subFolder, files pipes ...
The node is a File.
Definition: FSNode.hpp:61
bool FSNodeCreate(const std::string &_path, etk::FSNodeRight _right, enum etk::typeNode _type=etk::typeNode_folder)
Simple access for : Create a file or a folder depending of the request.
void fileFlush()
Flush the current file.
bool filePut(char _input)
Write data on the file.
basic namespace of the etk library. (it might contain all the etk fuctions/class/structures without m...
Definition: Archive.hpp:16
The node is a folder.
Definition: FSNode.hpp:58
acces at the home path of the system (with name of the current user)
Definition: FSNode.hpp:87
bool touch()
update the Time of the file with the current time
std::vector< TTT > FSNodeReadAllDataType(const std::string &_path)
Read all the data from a file.
Definition: FSNode.hpp:891
void folderGetRecursiveFiles(std::vector< std::string > &_output, bool _recursiveEnable=true)
Get all the File inside a Folder (done recursively)
uint64_t FSNodeGetTimeModified(const std::string &_path)
Simple access for : Getting Modification time of the current node.
Theme area.
Definition: FSNode.hpp:113
uint64_t fileSize()
Get the File size.
int64_t fileTell()
Get the position in the file.
bool FSNodeTouch(const std::string &_path)
Simple access for : Update Modification time with the current time of the node (>) ...
Access on the application temporary path (remove when user want and whe the compter restart or have n...
Definition: FSNode.hpp:105
bool fileSeek(long int _offset, enum etk::seekNode _origin)
Move in the file Position.
FSNType
Type of the file/folder/... accessible in the Node.
Definition: FSNode.hpp:77
request seek position start at the START of the file
Definition: FSNode.hpp:70
bool fileOpenAppend()
Open the file in write Append Mode.
void FSNodeWriteAllDataType(const std::string &_path, const std::vector< TTT > &_data)
Write all the data in a file.
Definition: FSNode.hpp:912
request seek position start at the CURRENT position in the file
Definition: FSNode.hpp:72
std::string simplifyPath(std::string _input)
Simplify a path with all the complication that mean ".." or "///\//".
~FSNode()
Destructor.
seekNode
Seek mode availlable (just to wrap it ...)
Definition: FSNode.hpp:69
Access on the application data (internal application data are the one provided with the binary) ...
Definition: FSNode.hpp:93
bool fileOpenWrite()
Open the file in write Mode.
int64_t FSNodeGetCount(const std::string &_path)
Simple access for : count the number of element in a path (if it is not a path ==> return -1) ...
std::string getUserHomeFolder()
Get the home folder of the user.
bool FSNodeEcho(const std::string &_path, const std::string &_dataTowrite)
Simple access for : Basic write on the node (like console echo)
bool operator!=(const etk::FSNode &_obj) const
Check if the 2 node are NOT link with the same file.
std::string timeAccessedString() const
Get the Accessed time of the File.
void setArgZero(const std::string &_val)
Set the firt argument of the application start (this permit to get the real position of the execution...
bool exist() const
Check if the node exist.
Definition: FSNode.hpp:226
void FSNodeWriteAllData(const std::string &_path, const std::string &_data)
Write all the data in a file.
std::string fileGetExtention()
Get the extention of the Node.
The node is a Char device type (Not availlable on Windows)
Definition: FSNode.hpp:57
Access at the file System with a relative naming like "../plop/xxx.txt".
Definition: FSNode.hpp:81
void FSNodeHistory(const std::string &_path, int32_t _historyCount)
move file to generate an history of the current file
std::string getUserRunFolder()
Get the folder of the Program is running.
std::vector< T > fileReadAll()
Read all element in a file and set it in a generic vector.
Definition: FSNode.hpp:588
enum etk::typeNode FSNodeGetType(const std::string &_path)
Simple access for : Get type of the current node.
std::string fileReadAllString()
Read all element in a file and set it in a generic std::string.
Definition: FSNode.hpp:598
std::string getNameFolder() const
Get the current folder of the Node. (file system name)
uint64_t timeCreated() const
Get the creating time of the File.
Theme data area.
Definition: FSNode.hpp:114
FSNode(const std::string &_path="~")
Constructor.
std::string FSNodeGetRealName(const std::string &_path)
get the system name of the current path
const etk::FSNode & operator=(const etk::FSNode &_obj)
copy the other FSnode ==> for vector
bool FSNodeEchoAdd(const std::string &_path, const std::string &_dataTowrite)
Simple access for : Basic write on the node (like console echo) in adding mode (>>) ...
std::vector< std::string > FSNodeExplodeMultiplePath(const std::string &_path)
Get all the Path contain in the specidy path:
int64_t fileRead(void *_data, int64_t _blockSize, int64_t _nbBlock)
Read data from the file.
The node is a Fifo (Not availlable on Windows)
Definition: FSNode.hpp:59
The node is a block aceess device (Not availlable on Windows)
Definition: FSNode.hpp:56
bool fileHasExtention()
Check if the file have an extention ( ***.ccc)
Access at the file System with a direct naming like "/home/plop/xxx.txt".
Definition: FSNode.hpp:80
void setBaseFolderData(const char *_folder, const char *_applName=nullptr)
Set manualy the folder of the Data.(like /usr/shared/applName/ for linux)
Type of the node is not known.
Definition: FSNode.hpp:55
std::string getFileSystemName() const
Get the Generate FileSystem name.
std::string timeModifiedString() const
Get the modifying time of the File.
std::string FSNodeGetApplicationName()
Get application name.
std::vector< etk::FSNode * > folderGetSubList(bool _showHidenFile=true, bool _getFolderAndOther=true, bool _getFile=true, bool _temporaryFile=true)
Get the List of all node inside a node (folder only)
The node is a Link.
Definition: FSNode.hpp:60
void fileWriteAll(const std::string &_value)
Write all the vector in a file.
Definition: FSNode.hpp:621
void fileWriteAll(const std::vector< T > &_value)
Write all the vector in a file.
Definition: FSNode.hpp:614
void initDefaultFolder(const char *_applName)
Initialyse all the subFolder usable by the user like DATA/HOME/CACHE/USERDATA.
enum typeNode getNodeType() const
Get the node type.
Definition: FSNode.hpp:233
File System Right management.
Definition: FSNodeRight.hpp:15
Unknow type of the node (many time no file name seted)
Definition: FSNode.hpp:78
void setBaseFolderCache(const char *_folder)
Set the Cach folder for the application (like /tmp)
The node is a socket.
Definition: FSNode.hpp:62
FS node is for File System IO access (named classicly "node in linux EXT) This class is independent o...
Definition: FSNode.hpp:163
std::string FSNodeReadAllData(const std::string &_path)
Read all the data from a file.
std::string timeCreatedString() const
Get the creating time of the File.
std::string getRelativeFolder() const
Get the current folder of the Node.
bool move(const std::string &_path)
Move the Node at a new path.
enum FSNType getTypeAccess() const
Get the node type (DATA/DIRECT...)
Definition: FSNode.hpp:323
Access on the user application data (where the data are stored when the application stop) ...
Definition: FSNode.hpp:99
std::string getNameFile() const
Get the file or current file name (if it was a file)
request seek position start at the END of the file
Definition: FSNode.hpp:71
std::string getName() const
Get the current compleate node name (file system name)
etk::FSNodeRight getRight() const
Get the node Right.
Definition: FSNode.hpp:240
uint64_t FSNodeGetTimeAccessed(const std::string &_path)
Simple access for : Getting Accessing time of the current node.
typeNode
List of Type that a node can have (this wrap some type that not exist on Windows) ...
Definition: FSNode.hpp:54
bool operator==(const etk::FSNode &_obj) const
Check if the 2 node are link with the same file.
uint64_t FSNodeGetTimeCreated(const std::string &_path)
Simple access for : Getting creation time of the current node.
int64_t fileWrite(const void *_data, int64_t _blockSize, int64_t _nbBlock)
Write data on the file.
bool FSNodeExist(const std::string &_path)
Simple access for : chexk the exestance of an element.