Interface ManagedDirectory
- All Superinterfaces:
 DirectoryBuilder, PathRoot
Base interface for a managed directory, including the interfaces for creating fluent-style
builders.
- Since:
 - 0.0.1
 - Author:
 - Ashley Scopes
 
- 
Method Summary
Modifier and TypeMethodDescriptiondefault ManagedDirectoryalso()Method that returns the object it is called upon to enable creating fluent-language builders.default ManagedDirectoryand()Method that returns the object it is called upon to enable creating fluent-language builders.voidclose()Close the resource.default DirectoryBuildercreateDirectory(String... fragments) Create a directory builder for the given path in this RAM file system.createDirectory(List<String> fragments) Create a directory builder for the given path in this RAM file system.default FileBuildercreateFile(String... fragments) Create a file builder for the given path in this RAM file system.createFile(List<String> fragments) Create a file builder for the given path in this RAM file system.getName()Get the identifying name of the temporary file system.default ManagedDirectorythen()Method that returns the object it is called upon to enable creating fluent-language builders.Methods inherited from interface DirectoryBuilder
copyContentsFrom, copyContentsFrom, copyContentsFrom, copyContentsFrom, thatIsEmpty 
- 
Method Details
- 
also
Method that returns the object it is called upon to enable creating fluent-language builders.For example:
thisDirectory .createFile("foo", "bar", "baz.txt").withContents(...) .and().also() .createFile("foo", "bar", "bork.txt").withContents(...);- Returns:
 - this object.
 - See Also:
 
 - 
and
Method that returns the object it is called upon to enable creating fluent-language builders.For example:
thisDirectory .createFile("foo", "bar", "baz.txt").withContents(...) .and() .createFile("foo", "bar", "bork.txt").withContents(...);- Returns:
 - this object.
 - See Also:
 
 - 
close
Close the resource.This specifically is not provided by implementing
Closeableas to prevent IDEs giving false linting errors about not closing resources.Users should not need to call this directly if they are using instances produced from a
Workspaceimplementation.- Throws:
 IOException- if an IO exception occurs.
 - 
createDirectory
Create a directory builder for the given path in this RAM file system.Examples:
// Using platform-specific separators. dir.createDirectory("foo/bar/baz")...; // Letting JCT infer the correct path separators to use (recommended). dir.createDirectory("foo", "bar", "baz")...;- Parameters:
 fragments- the parts of the path.- Returns:
 - the directory builder.
 - Throws:
 IllegalArgumentException- if no path fragments are provided.NullPointerException- if any of the path fragments arenull.
 - 
createDirectory
Create a directory builder for the given path in this RAM file system.Examples:
// Using platform-specific separators. dir.createDirectory(List.of("foo/bar/baz"))...; // Letting JCT infer the correct path separators to use (recommended). dir.createDirectory(List.of("foo", "bar", "baz"))...;- Parameters:
 fragments- the parts of the path.- Returns:
 - the directory builder.
 - Throws:
 IllegalArgumentException- if no path fragments are provided.NullPointerException- if any of the path fragments arenull.- Since:
 - 4.0.0
 
 - 
createFile
Create a file builder for the given path in this RAM file system.// Using platform-specific separators. dir.createFile("foo/bar/baz.txt")...; // Letting JCT infer the correct path separators to use (recommended). dir.createFile("foo", "bar", "baz.txt")...;- Parameters:
 fragments- the parts of the path.- Returns:
 - the file builder.
 - Throws:
 IllegalArgumentException- if no path fragments are provided.NullPointerException- if any of the path fragments arenull.
 - 
createFile
Create a file builder for the given path in this RAM file system.// Using platform-specific separators. dir.createFile(List.of("foo/bar/baz.txt"))...; // Letting JCT infer the correct path separators to use (recommended). dir.createFile(List.of("foo", "bar", "baz.txt"))...;- Parameters:
 fragments- the parts of the path.- Returns:
 - the file builder.
 - Throws:
 IllegalArgumentException- if no path fragments are provided.NullPointerException- if any of the path fragments arenull.- Since:
 - 4.0.0
 
 - 
getName
 - 
then
Method that returns the object it is called upon to enable creating fluent-language builders.For example:
thisDirectory .createFile("foo", "bar", "baz.txt").withContents(...) .and().then() .createFile("foo", "bar", "bork.txt").withContents(...);- Returns:
 - this object.
 - See Also:
 
 
 -