Package ratpack.config
Interface FileSystemBinding
-
public interface FileSystemBindingA file system binding represents a file system location that is used to resolve relative paths. Every exchange has a file system binding available via its service, as every Ratpack app has a file system binding.The file system binding is used by asset serving handlers, among other places.
-
-
Field Summary
Fields Modifier and Type Field Description static com.google.common.reflect.TypeToken<FileSystemBinding>TYPEA type token for this type.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description FileSystemBindingbinding(String path)Construct a new binding by using the given path as a relative path from this bind point.Pathfile(String path)Creates a file reference relative to the bind point denoted by the given relative path.PathgetFile()The actual point on the filesystem that this binding is bound to.static FileSystemBindingof(Path path)static FileSystemBindingroot()
-
-
-
Field Detail
-
TYPE
static final com.google.common.reflect.TypeToken<FileSystemBinding> TYPE
A type token for this type.- Since:
- 1.1
-
-
Method Detail
-
root
static FileSystemBinding root()
-
of
static FileSystemBinding of(Path path)
-
getFile
Path getFile()
The actual point on the filesystem that this binding is bound to.- Returns:
- The actual point on the filesystem that this binding is bound to.
-
file
@Nullable Path file(String path)
Creates a file reference relative to the bind point denoted by the given relative path. Absolute paths are resolved relative to the bind point, not the filesystem root.- Parameters:
path- The relative path from this binding to the desired file- Returns:
- The file
-
binding
FileSystemBinding binding(String path)
Construct a new binding by using the given path as a relative path from this bind point. Absolute paths are resolved relative to the bind point, not the filesystem root.- Parameters:
path- The relative path from this binding to the desired binding- Returns:
- The binding
-
-