I have this code witch detect file on usb, I want to add the name of the files to array list of strings, how can I continue?
final String CP = "cp ";
final String DEST = " /home/user/Desktop";
final String TERMINAL_COMMAND = "ls /media/user/";
String USB_UUID = null;
//System.out.println(TERMINAL_COMMAND);
try {
Process p = Runtime.getRuntime().exec( TERMINAL_COMMAND );
BufferedReader in = new BufferedReader(
new InputStreamReader(p.getInputStream()) );
while ((USB_UUID = in.readLine()) != null) {
//System.out.println(USB_UUID);
final String FILETOSTART = "/media/user/"+USB_UUID;
}
in.close();
}