// 

import java.io.*;

public abstract class Repertoire extends File {
  private static final int lim=20;
  public Repertoire(String s)
  {super(s);}
     
  private void AfficheUnFichier(String ref)
    {File unElement= new File(this,ref);        
     System.out.print((unElement.canRead())? "L" :" ");
     System.out.print((unElement.canWrite())? "E" :" ");        
     System.out.print(" "+ref);  
     if (unElement.isDirectory()) 
           System.out.println("\t"+"repertoire"); 
      else if (unElement.canRead())
                System.out.println("\t"+unElement.length()); 
           else   
                System.err.println(" ????");   
    }
  public void afficheListe(String[] fichiers)
    {System.out.println(this.getName());
     if (fichiers.length==0)
       {System.out.println("aucun fichier");
        return;}
     for(int i=0;i<fichiers.length;i++)
       {if ((i>0) && ((i % lim)==0))
          {System.out.println("<retour> pour continuer");
           try {System.in.read();}
           catch (IOException e){};} 
        this.AfficheUnFichier(fichiers[i]);        
       };
     System.out.println(" "+fichiers.length+ " fichiers");
    } 
}