Represents a branch in an {S3::Tree}. From a branch node you can descend deeper into the tree using {AWS::S3::Tree::Parent#children} or go back to the parent node using {parent}.
When enumerating nodes in an S3 tree keys grouped by a common prefix are represented as a branch node.
Branch nodes are often treated like directories.
@see Tree @note Generally you do not need to create branch nodes.
@return [Tree, BranchNode] The parent node in the tree.
@private
# File lib/aws/s3/tree/branch_node.rb, line 34 def initialize parent, collection, options = {} @parent = parent super(collection, options.merge(:prefix => collection.prefix)) end
Returns a new Tree object that starts at this branch node. The returned tree will have the same prefix, delimiter and append mode as the tree the branch belongs to.
@return [Tree]
# File lib/aws/s3/tree/branch_node.rb, line 58 def as_tree Tree.new(collection, :prefix => prefix, :delimiter => delimiter, :append => append?) end
@return [true]
# File lib/aws/s3/tree/branch_node.rb, line 44 def branch? true end
@return [false]
# File lib/aws/s3/tree/branch_node.rb, line 49 def leaf? false end