Link to home
Start Free TrialLog in
Avatar of Rocking
Rocking

asked on

how to identify c drive exists in windows

hi,
i need to create the folder through java.Before creating the folder i need to check the Opertaing systen is linux or windows?
If it is windows then check c:\ drive exists and create folder in that?
how to identify c:\exists in windows
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rocking
Rocking

ASKER

in case if the c: drive does not exists and i need to create a folder on that system.
how to identify which drives exists in windows?
http://docs.oracle.com/javase/8/docs/api/java/io/File.html#listRoots

I don't think it's even possible for C: to be absent actually
:)