Searched refs:parentDir (Results 1 - 2 of 2) sorted by relevance

/libcore/tzdata/update/src/main/libcore/tzdata/update/
H A DFileUtils.java39 * Creates a new {@link java.io.File} from the {@code parentDir} and {@code name}, but only if
40 * the resulting file would exist beneath {@code parentDir}. Useful if {@code name} could
43 * @throws java.io.IOException if the file would not exist beneath {@code parentDir}
45 public static File createSubFile(File parentDir, String name) throws IOException { argument
46 // The subFile must exist beneath parentDir. If name contains "/../" this may not be the
48 File subFile = new File(parentDir, name).getCanonicalFile();
49 if (!subFile.getPath().startsWith(parentDir.getCanonicalPath())) {
50 throw new IOException(name + " must exist beneath " + parentDir +
/libcore/tzdata/update/src/test/libcore/tzdata/update/
H A DFileUtilsTest.java271 private static void assertCreateSubFileThrows(File parentDir, String name) { argument
273 FileUtils.createSubFile(parentDir, name);
314 private File createDir(File parentDir, String name) { argument
315 File dir = new File(parentDir, name);

Completed in 154 milliseconds