Discussione: [Java] File
View Single Post
Old 18-10-2005, 19:38   #3
Oceans11
Senior Member
 
L'Avatar di Oceans11
 
Iscritto dal: Sep 2005
Città: Torino
Messaggi: 606
guldo76 ha visto giusto!!!!
nella classe file del package java.io c'è il metodo
public String[] list()

che restituisce una array di stringhe dove ogni stringa è il nome dei file e delle directory...probabilmente ti può essere utile anche il metodo

boolean isDirectory()

che restituisce true se il file che usi è una directory, false altrimenti.

puoi usarlo sia per vedere se stai veramente guardando una dir o se vuoi solo elenco dei file e non delle subdir
Oceans11 è offline   Rispondi citando il messaggio o parte di esso
 
Hardware Upgrade Forum Database Error
Database Error Database error
The Hardware Upgrade Forum database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.hwupgrade.it home page, then try to open another page.
  • Click the Back button to try another link.
The www.hwupgrade.it forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.