diff --git a/etk/os/FSNode.cpp b/etk/os/FSNode.cpp index a2641d7..6cf9c14 100644 --- a/etk/os/FSNode.cpp +++ b/etk/os/FSNode.cpp @@ -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 diff --git a/etk/os/FSNode.h b/etk/os/FSNode.h index e2b088f..5121e85 100644 --- a/etk/os/FSNode.h +++ b/etk/os/FSNode.h @@ -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 */