[DEV] dev add interface n the FSNode 'getChar'
This commit is contained in:
parent
3c27f446f4
commit
35b678fb65
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user