From 2c649d3741503c66386de4f38f319a97fcbe6a4e Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Fri, 26 Apr 2013 22:20:12 +0200 Subject: [PATCH] [DEV] add getting real path of the file node --- etk/os/FSNode.cpp | 10 ++++++++-- etk/os/FSNode.h | 13 +++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/etk/os/FSNode.cpp b/etk/os/FSNode.cpp index 92fd9b3..92d8199 100644 --- a/etk/os/FSNode.cpp +++ b/etk/os/FSNode.cpp @@ -872,6 +872,10 @@ etk::UString etk::FSNode::GetNameFolder(void) const } return ""; } +etk::UString etk::FSNode::GetFileSystemName(void) const +{ + return m_systemFileName; +} etk::UString etk::FSNode::GetName(void) const { @@ -1266,7 +1270,7 @@ etk::FSNode etk::FSNode::FolderGetParent(void) return tmpp; } -void etk::FSNode::FolderGetRecursiveFiles(etk::Vector& output) +void etk::FSNode::FolderGetRecursiveFiles(etk::Vector& output, bool recursiveEnable) { #ifdef __TARGET_OS__Android if( m_type == etk::FSN_TYPE_DATA @@ -1315,7 +1319,9 @@ void etk::FSNode::FolderGetRecursiveFiles(etk::Vector& output) output.PushBack(tmpVal); } if(tmpEmement->GetNodeType() == etk::FSN_FOLDER) { - tmpEmement->FolderGetRecursiveFiles(output); + if (true==recursiveEnable) { + tmpEmement->FolderGetRecursiveFiles(output); + } } delete(tmpEmement); tmpEmement = NULL; diff --git a/etk/os/FSNode.h b/etk/os/FSNode.h index 04ddee6..f4488a0 100644 --- a/etk/os/FSNode.h +++ b/etk/os/FSNode.h @@ -151,11 +151,6 @@ namespace etk * @brief Update the internal data of the right type, and times */ void UpdateFileSystemProperty(void); - /** - * @brief Get the Generate FileSystem name - * @return the requested filename - */ - etk::UString GetFileSystemName(void) const; /** * @brief Common set name of the Node (if the user decide to change the node selection * @param[in] newName Name of the Node @@ -205,6 +200,11 @@ namespace etk * @return false : action not done */ void SetName(const etk::UString& newName); + /** + * @brief Get the Generate FileSystem name + * @return the requested filename + */ + etk::UString GetFileSystemName(void) const; /** * @brief Get the current folder of the Node. (file system name) * @return the common name define (like /xxxxx/xxxxx/ or c:/xxxxx/xxxxx/) @@ -334,8 +334,9 @@ namespace etk /** * @brief Get all the File inside a Folder (done recursively) * @param[out] output List of all the File names (You must clear it before set it in) + * @param[in] recursiveEnable Activate the recursive mode (enable by default) */ - void FolderGetRecursiveFiles(etk::Vector& output); + void FolderGetRecursiveFiles(etk::Vector& output, bool recursiveEnable=true); /** * @brief Check if the file have an extention ( ***.ccc) * @return true The file have an extention.