Interface DirectoryWriter
- All Known Implementing Classes:
DefaultDirectoryWriter
public interface DirectoryWriter
Interface for methods to convert a directory to various String representations.
- Since:
- 3.0.0
-
Method Summary
Modifier and TypeMethodDescriptionConvert a given directory to an String containing a full valid HTML page.Convert a given directory to an String of JSON.
-
Method Details
-
toHtml
String toHtml(@NotNull @NotNull File directory, @URL @URL String requestURL, boolean includeParent) throws Exception Convert a given directory to an String containing a full valid HTML page.- Parameters:
directory
- The directory to convert. Not null. Is directory.requestURL
- The URL of the request that kicked off this processincludeParent
- Whether the conversion should include reference to the parent directory.- Returns:
- String HTML representation of the directory
- Throws:
Exception
- for any conversion problem
-
toJson
String toJson(@NotNull @NotNull File directory, @URL @URL String requestURL, boolean includeParent) throws Exception Convert a given directory to an String of JSON.- Parameters:
directory
- The directory to convert. Not null. Is directory.requestURL
- The URL of the request that kicked off this processincludeParent
- Whether the conversion should include reference to the parent directory.- Returns:
- String HTML representation of the directory
- Throws:
Exception
- for any conversion problem
-