Class: etk::FSNode


Synopsis:

+                              FSNode                   (const std::string & _path);
+ FSNode (const std::u32string & _path);
+ ~FSNode (void);
+ bool exist (void);
+ etk::FSNodeRight getRight (void);
+ bool setRight (etk::FSNodeRight _newRight);
+ void setName (const std::string & _newName);
+ void setName (const std::u32string & _newName);
+ std::string getFileSystemName (void);
+ std::u32string getUFileSystemName (void);
+ std::string getNameFolder (void);
+ std::u32string getUNameFolder (void);
+ std::string getName (void);
+ std::u32string getUName (void);
+ std::string getNameFile (void);
+ std::u32string getUNameFile (void);
+ std::string getRelativeFolder (void);
+ std::u32string getURelativeFolder (void);
+ bool touch (void);
+ bool move (const std::string & _path);
+ bool move (const std::u32string & _path);
+ bool remove (void);
+ uint64_t timeCreated (void);
+ std::string timeCreatedString (void);
+ std::u32string timeUCreatedString (void);
+ uint64_t timeModified (void);
+ std::string timeModifiedString (void);
+ std::u32string timeUModifiedString (void);
+ uint64_t timeAccessed (void);
+ std::string timeAccessedString (void);
+ std::u32string timeUAccessedString (void);
+ const etk::FSNode & operator= (const etk::FSNode & _obj);
+ bool operator== (const etk::FSNode & _obj);
+ bool operator!= (const etk::FSNode & _obj);
+ friend etk::CCout & operator<< (etk::CCout & _os,
const etk::FSNode & _obj);
+ int64_t folderCount (void);
+ std::vector folderGetSubList (bool _showHidenFile,
bool _getFolderAndOther,
bool _getFile,
bool _temporaryFile);
+ etk::FSNode folderGetParent (void);
+ void folderGetRecursiveFiles (std::vector & _output,
bool _recursiveEnable);
+ void folderGetRecursiveFiles (std::vector & _output,
bool _recursiveEnable);
+ bool fileHasExtention (void);
+ std::string fileGetExtention (void);
+ std::u32string fileUGetExtention (void);
+ uint64_t fileSize (void);
+ bool fileOpenRead (void);
+ bool fileOpenWrite (void);
+ bool fileOpenAppend (void);
+ bool fileClose (void);
+ char * fileGets (char * _elementLine,
int64_t _maxData);
+ char fileGet (void);
+ int64_t fileRead (void * _data,
int64_t _blockSize,
int64_t _nbBlock);
+ int64_t fileWrite (void * _data,
int64_t _blockSize,
int64_t _nbBlock);
+ bool fileSeek (long int _offset,
enum etk::seekNode _origin);
+ void fileFlush (void);
- void generateFileSystemPath (void);
- void updateFileSystemProperty (void);
- void privateSetName (const std::string & _newName);
- void privateSetName (const std::u32string & _newName);
- bool loadDataZip (void);
- void sortElementList (std::vector & _list);

Description:

/** * @brief FS node is for File system IO access This class is independent of the OS, If you acces to a file in windows, it might generate the right loke Linux (it is important to know that windows right is lighter than linux) */

Detail:

etk::FSNode ()

FSNode(const std::string & _path);

Constructor


etk::FSNode ()

FSNode(const std::u32string & _path);



etk::~FSNode ()

~FSNode(void);

Destructor
Notes: you will have some warning if you did not close your files


exist ()

bool exist(void);

Check if the node exist.


getRight ()

etk::FSNodeRight getRight(void);

Get the node Right


setRight ()

bool setRight(etk::FSNodeRight _newRight);

Set the specific right of the node


setName ()

void setName(const std::string & _newName);

Change the Node seeing (not rename the node, for this


setName ()

void setName(const std::u32string & _newName);



getFileSystemName ()

std::string getFileSystemName(void);

Get the Generate FileSystem name


getUFileSystemName ()

std::u32string getUFileSystemName(void);



getNameFolder ()

std::string getNameFolder(void);

Get the current folder of the Node. (file system name)
Notes: Auto remove of ../../../ and //


getUNameFolder ()

std::u32string getUNameFolder(void);



getName ()

std::string getName(void);

Get the current compleate node name (file system name)
Notes: Auto remove of ../../../ and //


getUName ()

std::u32string getUName(void);



getNameFile ()

std::string getNameFile(void);

Get the file or current file name (if it was a file)


getUNameFile ()

std::u32string getUNameFile(void);



getRelativeFolder ()

std::string getRelativeFolder(void);

Get the current folder of the Node.
Notes: Auto remove of ../../../ and //


getURelativeFolder ()

std::u32string getURelativeFolder(void);



touch ()

bool touch(void);

update the Time of the file with the current time


move ()

bool move(const std::string & _path);

Move the Node at a new path


move ()

bool move(const std::u32string & _path);



remove ()

bool remove(void);

Remove the current node ( if folder, this remove all subfolder but not the Link subfolder)


timeCreated ()

uint64_t timeCreated(void);

Get the creating time of the File


timeCreatedString ()

std::string timeCreatedString(void);

Get the creating time of the File


timeUCreatedString ()

std::u32string timeUCreatedString(void);



timeModified ()

uint64_t timeModified(void);

Get the modifying time of the File


timeModifiedString ()

std::string timeModifiedString(void);

Get the modifying time of the File


timeUModifiedString ()

std::u32string timeUModifiedString(void);



timeAccessed ()

uint64_t timeAccessed(void);

Get the Accessed time of the File


timeAccessedString ()

std::string timeAccessedString(void);

Get the Accessed time of the File


timeUAccessedString ()

std::u32string timeUAccessedString(void);



operator= ()

const etk::FSNode & operator=(const etk::FSNode & _obj);

copy the other FSnode ==> for vector


operator== ()

bool operator==(const etk::FSNode & _obj);

Check if the 2 node are link with the same file


operator!= ()

bool operator!=(const etk::FSNode & _obj);

Check if the 2 node are NOT link with the same file


operator<< ()

friend etk::CCout & operator<<(etk::CCout & _os,
                               const etk::FSNode & _obj);

Write in the statard debug IO the current node


folderCount ()

int64_t folderCount(void);

Count the number of subFolder in the curent Folder


folderGetSubList ()

std::vector folderGetSubList(bool _showHidenFile,
                                            bool _getFolderAndOther,
                                            bool _getFile,
                                            bool _temporaryFile);

Get the List of all node inside a node (folder only)


folderGetParent ()

etk::FSNode folderGetParent(void);

Get the father node of this node


folderGetRecursiveFiles ()

void folderGetRecursiveFiles(std::vector & _output,
                             bool _recursiveEnable);

Get all the File inside a Folder (done recursively)


folderGetRecursiveFiles ()

void folderGetRecursiveFiles(std::vector & _output,
                             bool _recursiveEnable);



fileHasExtention ()

bool fileHasExtention(void);

Check if the file have an extention ( ***.ccc)


fileGetExtention ()

std::string fileGetExtention(void);

Get the extention of the Node


fileUGetExtention ()

std::u32string fileUGetExtention(void);



fileSize ()

uint64_t fileSize(void);

Get the File size


fileOpenRead ()

bool fileOpenRead(void);

Open the file in Read mode


fileOpenWrite ()

bool fileOpenWrite(void);

Open the file in write Mode
Notes: You can not do it with the DATA: file ==> this is not allowed in some Board like Android)


fileOpenAppend ()

bool fileOpenAppend(void);

Open the file in write Append Mode
Notes: You can not do it with the DATA: file ==> this is not allowed in some Board like Android)


fileClose ()

bool fileClose(void);

Close the cuurent file


fileGets ()

char * fileGets(char * _elementLine,
                int64_t _maxData);

Get the pointer on the start line and the next line (or null)


fileGet ()

char fileGet(void);

Get a unique data in the file


fileRead ()

int64_t fileRead(void * _data,
                 int64_t _blockSize,
                 int64_t _nbBlock);

Read data from the file


fileWrite ()

int64_t fileWrite(void * _data,
                  int64_t _blockSize,
                  int64_t _nbBlock);

Write data on the file


fileSeek ()

bool fileSeek(long int _offset,
              enum etk::seekNode _origin);

Move in the file Position


fileFlush ()

void fileFlush(void);

Flush the current file


generateFileSystemPath ()

void generateFileSystemPath(void);

Internal methode that create the internal Real system name (transform DATA: HOME: DATA:GUI: in the real name of the files)


updateFileSystemProperty ()

void updateFileSystemProperty(void);

Update the internal data of the right type, and times


privateSetName ()

void privateSetName(const std::string & _newName);

Common set name of the Node (if the user decide to change the node selection


privateSetName ()

void privateSetName(const std::u32string & _newName);



loadDataZip ()

bool loadDataZip(void);

Explocitly for Android that data are stored in the .apk that is a .zip not compressed


sortElementList ()

void sortElementList(std::vector & _list);

Order the list of subnode the folder first and the alphabetical order