a convenience method that specifies both request path and file system path bindings for serving files . the path specified is relative to the context 's pathbinding and filesystembinding at request time.the default value is effectively '' '' , which means that existing path binding and file system binding is used . import ratpack.test.embed.ephemeralbasedir ; import ratpack.test.embed.embeddedapp ; import static org.junit.assert.assertequals ; public class example public static void main string ... args throws exception ephemeralbasedir.tmpdir . use basedir - > basedir.write `` dir/a.txt '' , `` a '' ; embeddedapp.of s - > s . serverconfig c - > c.basedir basedir.getroot . handlers c - > c . files f - > f.files `` dir '' / / same as f.path `` dir '' . dir `` dir '' . test httpclient - > assertequals `` a '' , httpclient.gettext '' / dir/a.txt '' ; ; concode_field_sep PlaceHolder placeHolder concode_field_sep FileHandlerSpec path concode_elem_sep FileHandlerSpec indexFiles concode_elem_sep FileHandlerSpec dir
FileHandlerSpec function ( String arg0 ) { return arg0 ( arg0 ) . dir ( arg0 ) ; }