I searched a lot about it but i don't found anything. I have a file from `File f = File.getRoots().get(0);` and i would test if this drive is an SSD or an HDD.
Is this possible? Here is some pseudocode that you can see what i need it for:
File f = myFile.getRoot();
if(isSSD(f)){
System.out("We will write to SSD are you sure?");
}
If someone knows how to write the public static isSSD(File f)
method please help.
I know there is NO cross platform solution so i think i need one for linux mac and windows:
if(System.getProperty("os.name").contains("Windows")){
//The code for Win
}else if(System.getProperty("os.name").contains("UNIX")){
//The code for linux
}else if(System.getProperty("os.name").contains("Mac")){
//The code for mac
}
Gratefull for Answers.