Interface FileSystemBinding


  • public interface FileSystemBinding
    A 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 Detail

      • TYPE

        static final com.google.common.reflect.TypeToken<FileSystemBinding> TYPE
        A type token for this type.
        Since:
        1.1
    • Method Detail

      • 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