Improve documentation
This commit is contained in:
@@ -6,7 +6,9 @@ import java.nio.file.Files
|
||||
import java.nio.file.Path
|
||||
|
||||
class FSCreator {
|
||||
// Create entry, leaving existing folders' contents, but overwriting existing files.
|
||||
/**
|
||||
* Create entry, leaving existing folders' contents, but overwriting existing files.
|
||||
*/
|
||||
@Throws(FileSystemException::class)
|
||||
fun create(
|
||||
entryToCreate: FSEntry,
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package filesystem
|
||||
|
||||
// Note sealed allows for simpler logic in FSCreator by guaranteeing FSFile and FSFolder are the only possible FSEntries
|
||||
// (as we expect), and it also makes the class abstract as required.
|
||||
// (as we expect), and it also implicitly makes the class abstract as required.
|
||||
sealed class FSEntry(val name: String)
|
||||
|
||||
class FSFile(name: String, val content: String) : FSEntry(name)
|
||||
|
Reference in New Issue
Block a user