[DEV] dev add interface n the FSNode 'getChar'

This commit is contained in:
Edouard DUPIN 2013-08-05 20:48:30 +02:00
parent 3c27f446f4
commit 35b678fb65
2 changed files with 18 additions and 0 deletions

View File

@ -1485,6 +1485,19 @@ char* etk::FSNode::FileGets(char * _elementLine, int64_t _maxData)
#endif
return fgets(_elementLine, _maxData, m_PointerFile);
}
char etk::FSNode::FileGet(void)
{
char data='\0';
if (FileRead(&data, 1, 1)!=1) {
return '\0';
}
return data;
}
int64_t etk::FSNode::FileRead(void* _data, int64_t _blockSize, int64_t _nbBlock)
{
#ifdef __TARGET_OS__Android

View File

@ -388,6 +388,11 @@ namespace etk
* @return the pointer on the end of the cuurent line.
*/
char* FileGets(char* _elementLine, int64_t _maxData);
/**
* @brief Get a unique data in the file
* @return the next element in the file.
*/
char FileGet(void);
/**
* @brief Read data from the file
* @param[in,out] _data Pointer on the buffer that might be set the data