+
+ /* Implements the Cygwin notation for accessing MS Windows drive letters
+ * in a unix path. The path /cygdrive/c/myfile is converted to C:\file.
+ * As there is no POSIX standard for this, little checking is done. */
+ public static class CygdriveFS extends HostFS {
+ protected File hostFile(String path) {
+ final char drive = path.charAt(0);
+
+ if (drive < 'a' || drive > 'z' || path.charAt(1) != '/')
+ return null;
+
+ path = drive + ":" + path.substring(1).replace('/', '\\');
+ return new File(path);
+ }
+
+ public CygdriveFS() { super("/"); }
+ }