Class TestFileDirUtils


  • public class TestFileDirUtils
    extends Object
    Static utilities for testing
    Since:
    Apr 19, 2007 10:11:24 PM
    • 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.
      • addDirectory

        public static File addDirectory​(File parentDir,
                                        String dirName,
                                        long lastModTime)
      • 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.
      • addFile

        public static File addFile​(File parentDir,
                                   String fileName,
                                   long lastModTime)