I have created a media player using the media class of JavaFX. What I want is that the media player should search all media files available in the system on startup. is there any way to do this, any help will be appreciated. Thank you.
Asked
Active
Viewed 67 times
0
-
2There are a **lot** of ways to do this. What have you tried so far? Do you have a specific problem in your attempts? – Zephyr Aug 24 '18 at 03:32
-
1You can use ideas from [here](https://stackoverflow.com/questions/15624226/java-search-for-files-in-a-directory). I would search for file extensions and add them to a `List`. – SedJ601 Aug 24 '18 at 04:00
-
2Of course you could search every directory on the hard drive but don't be surprised if this takes multiple minutes, if not hours... – fabian Aug 24 '18 at 08:17
-
2you could ask the user to specify which directories contains his/her media files some media players do so – Ahmed Emad Aug 24 '18 at 08:23
-
@Zephyr I am new in JavaFX and I have tried nothing till now it does manually means user add files to the playlist, I want it to be done by the player itself – Nutesh Kumar Sahu Aug 26 '18 at 12:49