Monday, 16 November 2015

How to check wheather file exists

checking the code
        String filename = "test01.xml";
        URL url = getClass().getResource(filename);

        File file = new File(url.toURI());
        log.info("File exists: {}", file.exists());