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. Use inherited read() and write(...) for simple full-file text operations, or FileReader, FileWriter, openReader() and openWriter() when you need explicit reader or writer control.
| Modifier and Type | Member | Description |
|---|---|---|
| public | FilePathFilePath(base as FolderPath, names... as String): |
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. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | openInputStreamopenInputStream() as FileInputStream: |
Opens a binary input stream on this file. |
| public | openOutputStreamopenOutputStream() as FileOutputStream: |
Opens a binary output stream on this file. |
| public | openReaderopenReader() as FileReader: |
Opens a text reader on this file. |
| public | openWriteropenWriter() as FileWriter: |
Opens a text writer on this file and truncates existing content. |
| public | readPrefix | Reads at most the first `maxBytes` bytes from this file. |
| public native | touchtouch() as Void throws IOException |
Creates the file if it does not exist, or updates its last modification time. |