[DEV] add the possibility to flush data on files

This commit is contained in:
Edouard DUPIN 2012-11-11 20:40:14 +01:00
parent c920396923
commit 381dad6f1a
2 changed files with 15 additions and 0 deletions

View File

@ -1229,6 +1229,20 @@ bool etk::FSNode::FileSeek(long int offset, int origin)
}
}
void etk::FSNode::FileFlush(void)
{
#ifdef __TARGET_OS__Android
if( etk::FSN_TYPE_DATA == m_type
|| etk::FSN_TYPE_THEME_DATA == m_type) {
return;
}
#endif
if (NULL != m_PointerFile) {
fflush(m_PointerFile);
}
}
// TODO : Add an INIT to reset all allocated parameter :

View File

@ -202,6 +202,7 @@ namespace etk
int32_t FileRead(void * data, int32_t blockSize, int32_t nbBlock);
int32_t FileWrite(void * data, int32_t blockSize, int32_t nbBlock);
bool FileSeek(long int offset, int origin);
void FileFlush(void);
private:
void SortElementList(etk::Vector<etk::FSNode *> &list);
};