docs: public String translatePath(String path) {
          String translated;
          // special character: ~ maps to the user's home directory
          if (path.startsWith("~" + File.separator)) {
              translated = System.getProperty("user.home") + path.substring(1);
          } else if (path.startsWith("~")) {
              String userName = path.substring(1);
              translated = new File(new File(System.getProperty("user.home")).getParent(),
                      userName).getAbsolutePath();
              // Keep the path separator in translated or add one if no user home specified
              translated = userName.isEmpty() || path.endsWith(File.separator) ? translated + File.separator : translated;
          } else if (!new File(path).isAbsolute()) {
              translated = ctx.getCurrentDir().getAbsolutePath() + File.separator + path;
          } else {
              translated = path;
          }
          return translated;
      }