[DEV] add FSNode::fileIsOpen

This commit is contained in:
Edouard DUPIN 2015-05-12 21:09:16 +02:00
parent 9b5c977be1
commit b7e97f5941
2 changed files with 22 additions and 1 deletions

View File

@ -1631,6 +1631,21 @@ bool etk::FSNode::fileOpenAppend() {
return true;
}
bool etk::FSNode::fileIsOpen() {
#if (defined(__TARGET_OS__Android) || defined(__TARGET_OS__Windows))
if( etk::FSN_TYPE_DATA == m_type
|| etk::FSN_TYPE_THEME_DATA == m_type) {
if (m_zipContent == NULL) {
return false;
}
return true;
}
#endif
if (m_PointerFile == NULL) {
return false;
}
return true;
}
bool etk::FSNode::fileClose() {
#if (defined(__TARGET_OS__Android) || defined(__TARGET_OS__Windows))
if( etk::FSN_TYPE_DATA == m_type

View File

@ -427,7 +427,13 @@ namespace etk {
*/
bool fileOpenAppend();
/**
* @brief Close the cuurent file
* @brief Check if the current file is Open
* @return true : File is open in write or in read
* @return false : File is NOT open in write or in read
*/
bool fileIsOpen();
/**
* @brief Close the curent file
* @return true : action done
* @return false : action not done
*/