File (final String path) { if (path == null) { return null; } try { final File file = new File(path); if (file.isAbsolute()) { return file.getCanonicalFile(); } final String baseDir = getContextAntProject().getProjectBasedirPath(); if (baseDir == null) { return null; } return new File(FileUtil.toCanonicalPath(new File(baseDir, path).getPath())); } catch (IOException e) { return null; } }