Hello, I'm writing a program that has to mantain a large catalog of files. Those may be on different devices and I'd like to know what is the best way to do this in Java. I mean that I need to:
- Identify the device the file (or just a directory) is on and get a name or identifier for this device that will be consistent...
- Be able to use this device identifier to check if the device is plugged (like a USB pen, a HDD mounted or not, a network drive...)
- Having this compatible with Windows, Unix and whatever...
The ideal solution would be some kind of device abstraction... In the docs I can see that File is related to partitions but it doesn't seem to be a proper abstraction or object of the filesystem. Or maybe if there is not a proper java abstraction, the best way to handle this diversity on each system.