public interface

FileFactory

com.atlassian.jira.util.FileFactory
Known Indirect Subclasses

Class Overview

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

Summary

Public Methods
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.

Public Methods

public 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

public void removeDirectory (File directory)

Removes a directory.

Parameters
directory a File object

public void removeDirectoryIfExists (String directoryName)

Removes a directory if it exists.

Parameters
directoryName a String containing a directory path