public static Path getFile(String file) {
        if (file == null || file.isEmpty()) {
            throw new IllegalArgumentException("Non-empty file is required");
        } else if (file.startsWith("~/")) {
            return Paths.get(System.getProperty("user.home"), file.substring(2)).normalize();
        }
        return Paths.get(file).toAbsolutePath().normalize();
    }
Gets absolute and normalized path to the given file.

@param file non-empty file
@return non-null absolute and normalized path to the file
clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseUtils.java