Example #1
0
 private static void cd(final String dir) throws IOException {
   File newUserDir = new File(dir);
   if (!newUserDir.isAbsolute()) {
     newUserDir = new File(Shell.getUserDir().getAbsoluteFile().toPath().resolve(dir).toString());
   }
   if (!newUserDir.isDirectory()) {
     throw new IOException(dir + " directory doesn't exist");
   }
   Shell.setUserDir(newUserDir);
 }