publicstaticvoid main(String[] args) throws Exception {
File[] rs = File.listRoots(); for (int i = 0; i < rs.length; i++) {
System.out.println(i + ": " + rs[i]);
}
File f = new File(System.getProperty("test.src", "."), "ListRoots.java");
String cp = f.getCanonicalPath(); for (int i = 0; i < rs.length; i++) { if (cp.startsWith(rs[i].getPath())) break; if (i == rs.length - 1) thrownew Exception(cp + " does not have a recognized root");
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.