String (@NotNull String path) { if (path.startsWith("~/") || path.startsWith("~\\")) { path = System.getProperty("user.home") + path.substring(1); } return Paths.get(path).toAbsolutePath().normalize().toString(); }