FilePath
classin packageklyn.io
public class FilePath extends Path:
Represents a file path.
The path may point to an existing file or to a file that will be created later.
Properties inherited from Path: cwd,
exists,
isAbsolute,
isDirectory,
isNormalized,
isRegular,
isSymlink,
klynHome,
lastModified,
tempDir,
userHome
Constructors
| Modifier and Type |
Member |
Description |
| public |
FilePath |
Convenience overload when the base is already a FolderPath. |
| public |
FilePath |
Creates a file path by resolving multiple child segments from a base path. |
| public |
FilePath |
Creates a file path wrapper from a path string. |
| public |
FilePath |
Creates a file path wrapper from another path instance. |
Methods
| Modifier and Type |
Member |
Description |
| public |
openInputStream |
Opens a binary input stream on this file. |
| public |
openOutputStream |
Opens a binary output stream on this file. |
| public |
openReader |
Opens a text reader on this file. |
| public |
openWriter |
Opens a text writer on this file and truncates existing content. |
| public |
read |
Convenience helper reading and closing a text reader. |
| public native |
touch |
Creates the file if it does not exist, or updates its last modification time. |
| public |
write |
Convenience helper writing and closing a text writer. |
Methods inherited from Path: absolute,
delete,
endsWith,
extension,
file,
folder,
get,
lastModified,
name,
normalize,
parent,
relativize,
remove,
rename,
resolve,
resolve,
resolve,
resolve,
startsWith,
toAbsolute,
toString