<?php
my %status = ();
my %count = ();
foreach my $directory ($login->user->directories)
{
if ($directory->path ne '/')
{
$count{$directory->parent->path}++;
delete $status{$directory->depth} if ($count{$directory->parent->path} == 1);
$status{$directory->depth} = 1 if ($count{$directory->parent->path} == $directory->parent->directories->count);
}
?>