I am making this program that finds if you plugged in your PSP under Linux.

When you plug it in, it makes a file in /dev (Usually something like sbd1, sdf1 etc) It all depends on how many things are plugged into your computer.

Anyway is it possible to write something in C++ that finds that new file that was just made in /dev even though you don't know what the filename is?

I know thats asking a lot but I really need it.

Thanks.