public interface FileSystemBinding
The file system binding is used by asset serving handlers, among other places.
Chain.files(ratpack.func.Action)
Modifier and Type | Field and Description |
---|---|
static TypeToken<FileSystemBinding> |
TYPE
A type token for this type.
|
Modifier and Type | Method and Description |
---|---|
FileSystemBinding |
binding(java.lang.String path)
Construct a new binding by using the given path as a relative path from this bind point.
|
java.nio.file.Path |
file(java.lang.String path)
Creates a file reference relative to the bind point denoted by the given relative path.
|
java.nio.file.Path |
getFile()
The actual point on the filesystem that this binding is bound to.
|
static FileSystemBinding |
of(java.nio.file.Path path) |
static FileSystemBinding |
root() |
static final TypeToken<FileSystemBinding> TYPE
static FileSystemBinding root()
static FileSystemBinding of(java.nio.file.Path path)
java.nio.file.Path getFile()
@Nullable java.nio.file.Path file(java.lang.String path)
path
- The relative path from this binding to the desired fileFileSystemBinding binding(java.lang.String path)
Prefer using Context.file(String)
.
path
- The relative path from this binding to the desired binding