public final class TextFile extends Object
Constructor and Description |
---|
TextFile(File path)
Ctor.
|
TextFile(org.cactoos.Scalar<File> origin)
Ctor.
|
TextFile(org.cactoos.Scalar<File> origin,
Charset charset)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
String |
name()
The name of original file.
|
String |
path()
Absolute path to the file.
|
String |
text()
File content.
|
public TextFile(File path)
path
- The file for reading.public TextFile(org.cactoos.Scalar<File> origin)
origin
- File for reading.public String text() throws IOException
IOException
- if an I/O error occurspublic String path()
public String name()
Copyright © 2019. All rights reserved.