Code example for Path

Methods: toAbsolutePath

0
        } 
    } 
 
    protected boolean isFilePresent(Path file) throws IOException
    { 
        if (Files.exists(file))
        { 
            if (Files.isDirectory(file))
            { 
                throw new IOException("Directory in the way: " + file.toAbsolutePath());
            } 
 
            if (!Files.isReadable(file))
            { 
                throw new IOException("File not readable: " + file.toAbsolutePath());
            } 
             
            return true; 
        }