const classafBedSheet::FileHandler

sys::Obj
  afBedSheet::FileHandler

A Request Handler that maps uris to files on the file system.

Example, to map all uris prefixed with /pub/ to files under the <app>/etc/web/ directory, in your AppModule:

@Contribute { serviceType=FileHandler# }
static Void contributeFileHandler(MappedConfig conf) {
  conf[`/pub/`] = `etc/web/`.toFile
}

Don't forget to Route /pub/*** URIs to FileHandler:

@Contribute { serviceType=Routes# }
static Void contributeRoutes(OrderedConfig conf) {
  ...
  conf.add(Route(`/pub/***`, FileHandler#service))
  ...
}

Now all requests to /pub/css/mystyle.css will map to etc/web/css/mystyle.css

@uses MappedConfig of Uri:File

service

Source

File service(Uri remainingUri := ``)

Returns a File on the file system, as mapped from the given route relative uri.