com.atlassian.jira.util
Interface FileFactory

All Known Implementing Classes:
FileSystemFileFactory

public interface FileFactory

Interface for file operations. This interface exists so that we can mock out IO operations in unit tests.

Since:
v4.3

Method Summary
 File getFile(String absoluteFilename)
          Creates a File object for the file with the given path.
 void removeDirectory(File directory)
          Removes a directory.
 void removeDirectoryIfExists(String directoryName)
          Removes a directory if it exists.
 

Method Detail

getFile

File getFile(String absoluteFilename)
Creates a File object for the file with the given path.

Parameters:
absoluteFilename - a String containing an absolute path name
Returns:
a new File

removeDirectory

void removeDirectory(File directory)
Removes a directory.

Parameters:
directory - a File object

removeDirectoryIfExists

void removeDirectoryIfExists(String directoryName)
Removes a directory if it exists.

Parameters:
directoryName - a String containing a directory path


Copyright © 2002-2012 Atlassian. All Rights Reserved.