NAME

Archive::AndroidBackup::Tree

I admit there are many other more mature implementations of trees out there
Tree, Tree::Fast, Tree::Simple, Forrest::Tree and I can't think of a reason that makes mine better

SYNOPSIS

my $trunk = Tree->new;
$trunk->node('root');
$trunk = $trunk->get_or_add_child('branch.1');
$trunk = $trunk->get_or_add_child('branch.1');

add_child(;$node)

add a new child to tree

get_or_add_child($node);

adds a child with $node as its data or get an existing child 
returns an un-intialized orphan if node is undef
  *this will be added to the family upon setting node

node_as_string()

represent node value as string

as_string

print node via node_as_string, then recurse to children

NAME

DirTree

subclass of Tree specifically for unix paths

METHODS

build_from_str($unixPath);

splits on / and add children as appropriate
ie.  ->build_from_str('apps/com.your.namespace/_manifest');

build_from_file($fh)

build tree from STDIN
ie. ->build_from_file(FileHandle->new_from_fd(0, "r")); 

node_as_string

print fully qualified path

NAME Archive::AndroidBackup::TarIndex

SYNOPSIS

open (CMD, 'find apps/', '|') || die "no find?!";
my $tree = new Archive::AndroidBackup::TarIndex;
while (<CMD>) { 
  chomp;
  $tree->build_from_str($_);
};
print $tree->as_string;

build_from_str

augments super->build_from_str to
  infer package namespace from _manifest entry,
*also serve as validation on list of files to have _manifest