public class DirectoryCreator extends Object
Constructor and Description |
---|
DirectoryCreator(ProjectFilesystem filesystem)
Creates an instance of
DirectoryCreator |
Modifier and Type | Method and Description |
---|---|
void |
forcefullyCreateDirs(Path target)
Force a directory to be created.
|
ProjectFilesystem |
getFilesystem() |
void |
mkdirs(Path target)
Create a directory and all of its parents
|
Set<Path> |
recordedDirectories()
Get the set of directories that were either created by this class, or manually specified in
recordPath(Path) |
void |
recordPath(Path target)
Ensure that we record that a path was created.
|
public DirectoryCreator(ProjectFilesystem filesystem)
DirectoryCreator
filesystem
- The filesystem to operate onpublic Set<Path> recordedDirectories()
recordPath(Path)
public void recordPath(Path target)
DirectoryCreator
target
- public ProjectFilesystem getFilesystem()
public void mkdirs(Path target) throws IOException
target
- The path where a directory should existIOException
- If the directory could not be createdpublic void forcefullyCreateDirs(Path target) throws IOException
target
- The path where a directory should existIOException
- The directory could not be created, or files that needed to be removed
could not be removed