Package ucar.unidata.util.test
Class TestFileDirUtils
- java.lang.Object
-
- ucar.unidata.util.test.TestFileDirUtils
-
public class TestFileDirUtils extends Object
Static utilities for testing- Since:
- Apr 19, 2007 10:11:24 PM
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static File
addDirectory(File parentDir, String dirName)
In the given parent directory, add a subdirectory.static File
addDirectory(File parentDir, String dirName, long lastModTime)
static File
addFile(File parentDir, String fileName)
Add a file directly in the given parent directory.static File
addFile(File parentDir, String fileName, long lastModTime)
-
-
-
Method Detail
-
addDirectory
public static File addDirectory(File parentDir, String dirName)
In the given parent directory, add a subdirectory. Fail if the parent directory doesn't exist or isn't a directory or the new directory already exists.- Parameters:
parentDir
- the already existing parent directory.dirName
- the directory path to create- Returns:
- the java.io.File that represents the created directory.
-
addFile
public static File addFile(File parentDir, String fileName)
Add a file directly in the given parent directory. Fail if the parent directory doesn't exist or isn't a directory or if the new file already exists.- Parameters:
parentDir
- the already existing parent directory.fileName
- the name of the file to create (may not contain multiple path segments).- Returns:
- the java.io.File that represents the created file.
-
-