diff --git a/libgrive/src/drive/ResourceTree.cc b/libgrive/src/drive/ResourceTree.cc index aedbd23..6562ba2 100644 --- a/libgrive/src/drive/ResourceTree.cc +++ b/libgrive/src/drive/ResourceTree.cc @@ -111,29 +111,6 @@ const Resource* ResourceTree::FindByHref( const std::string& href ) const return i != map.end() ? *i : 0 ; } -/// Unlike other search functions, this one does not depend on the multi-index -/// container. It traverses the tree instead. -Resource* ResourceTree::FindByPath( const fs::path& path ) -{ - Resource *current = m_root ; - for ( fs::path::iterator i = path.begin() ; i != path.end() && current != 0 ; ++i ) - { - Trace( "path it = %1%", *i ) ; - - // current directory - if ( *i == "." ) - continue ; - - else if ( *i == ".." ) - current = current->Parent() ; - - else - current = current->FindChild( Path2Str(*i) ) ; - } - - return current ; -} - /// Reinsert should be called when the ID/HREF were updated bool ResourceTree::ReInsert( Resource *coll ) { diff --git a/libgrive/src/drive/ResourceTree.hh b/libgrive/src/drive/ResourceTree.hh index b7a2344..c28482f 100644 --- a/libgrive/src/drive/ResourceTree.hh +++ b/libgrive/src/drive/ResourceTree.hh @@ -74,7 +74,6 @@ public : Resource* FindByHref( const std::string& href ) ; const Resource* FindByHref( const std::string& href ) const ; - Resource* FindByPath( const fs::path& path ) ; Resource* FindByID( const std::string& id ) ; bool ReInsert( Resource *coll ) ; diff --git a/libgrive/src/drive/State.cc b/libgrive/src/drive/State.cc index 8825f0c..3a6e275 100644 --- a/libgrive/src/drive/State.cc +++ b/libgrive/src/drive/State.cc @@ -213,11 +213,6 @@ Resource* State::FindByHref( const std::string& href ) return m_res.FindByHref( href ) ; } -Resource* State::Find( const fs::path& path ) -{ - return m_res.FindByPath( path ) ; -} - State::iterator State::begin() { return m_res.begin() ; diff --git a/libgrive/src/drive/State.hh b/libgrive/src/drive/State.hh index 9ddd435..a0e1213 100644 --- a/libgrive/src/drive/State.hh +++ b/libgrive/src/drive/State.hh @@ -55,7 +55,6 @@ public : Resource* FindByHref( const std::string& href ) ; Resource* FindByID( const std::string& id ) ; - Resource* Find( const fs::path& path ) ; void Sync( http::Agent *http, const Json& options ) ;