import
java.io.
*
;
public class class_{
public static void tree(File f, int level){
String pre = "" ;
for ( int i = 0 ;i < level ;i ++ )
{
pre += " " ;
}
if (f.isDirectory()){
File childs[] = f.listFiles();
System.out.println();
for ( int i = 0 ;i < childs.length;i ++ )
{
System.out.println(pre + childs[i].getName());
if (childs[i].isDirectory()){
tree(childs[i],level + 1 );
}
}
}
}
public static void main (String [] args)
{
File f = new File( "D:/hhhhhhhhhhhhhhhhhhhhhhh" );
System.out.println(f.getName());
int level = 1 ;
tree(f,level);
}
public class class_{
public static void tree(File f, int level){
String pre = "" ;
for ( int i = 0 ;i < level ;i ++ )
{
pre += " " ;
}
if (f.isDirectory()){
File childs[] = f.listFiles();
System.out.println();
for ( int i = 0 ;i < childs.length;i ++ )
{
System.out.println(pre + childs[i].getName());
if (childs[i].isDirectory()){
tree(childs[i],level + 1 );
}
}
}
}
public static void main (String [] args)
{
File f = new File( "D:/hhhhhhhhhhhhhhhhhhhhhhh" );
System.out.println(f.getName());
int level = 1 ;
tree(f,level);
}
}