I'm making a basic file browser and want to know how to get the number of files in any given directory (necessary for the for
loops that add the files to the tree and table)
From javadocs:
You can use:
new File("/path/to/folder").listFiles().length
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With