public interface FileAndResourceDirectives
Modifier and Type | Interface and Description |
---|---|
static interface |
FileAndResourceDirectives.DirectoryRenderer |
static class |
FileAndResourceDirectives.DirectoryRenderer$ |
static interface |
FileAndResourceDirectives.LowLevelDirectoryRenderer |
static class |
FileAndResourceDirectives.ResourceFile |
static class |
FileAndResourceDirectives.ResourceFile$ |
Modifier and Type | Method and Description |
---|---|
java.lang.ClassLoader |
_defaultClassLoader() |
Directive<scala.runtime.BoxedUnit> |
conditionalFor(long length,
long lastModified) |
scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> |
getFromBrowseableDirectories(scala.collection.immutable.Seq<java.lang.String> directories,
FileAndResourceDirectives.DirectoryRenderer renderer,
ContentTypeResolver resolver)
Serves the content of the given directories as a file system browser, i.e. files are sent and directories
served as browseable listings.
|
scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> |
getFromBrowseableDirectory(java.lang.String directory,
FileAndResourceDirectives.DirectoryRenderer renderer,
ContentTypeResolver resolver)
Same as
getFromBrowseableDirectories with only one directory. |
scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> |
getFromDirectory(java.lang.String directoryName,
ContentTypeResolver resolver)
Completes GET requests with the content of a file underneath the given directory.
|
scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> |
getFromFile(java.io.File file,
ContentType contentType)
Completes GET requests with the content of the given file.
|
scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> |
getFromFile(java.io.File file,
ContentTypeResolver resolver)
Completes GET requests with the content of the given file.
|
scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> |
getFromFile(java.lang.String fileName,
ContentTypeResolver resolver)
Completes GET requests with the content of the given file.
|
scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> |
getFromResource(java.lang.String resourceName,
ContentType contentType,
java.lang.ClassLoader classLoader)
Completes GET requests with the content of the given resource.
|
scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> |
getFromResource(java.lang.String resourceName,
ContentTypeResolver resolver)
Completes GET requests with the content of the given class-path resource.
|
scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> |
getFromResourceDirectory(java.lang.String directoryName,
java.lang.ClassLoader classLoader,
ContentTypeResolver resolver)
Same as "getFromDirectory" except that the file is not fetched from the file system but rather from a
"resource directory".
|
scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> |
listDirectoryContents(scala.collection.immutable.Seq<java.lang.String> directories,
FileAndResourceDirectives.DirectoryRenderer renderer)
Completes GET requests with a unified listing of the contents of all given directories.
|
scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> getFromFile(java.lang.String fileName, ContentTypeResolver resolver)
fileName
- (undocumented)resolver
- (undocumented)scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> getFromFile(java.io.File file, ContentTypeResolver resolver)
file
- (undocumented)resolver
- (undocumented)scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> getFromFile(java.io.File file, ContentType contentType)
file
- (undocumented)contentType
- (undocumented)Directive<scala.runtime.BoxedUnit> conditionalFor(long length, long lastModified)
scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> getFromResource(java.lang.String resourceName, ContentTypeResolver resolver)
resourceName
- (undocumented)resolver
- (undocumented)scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> getFromResource(java.lang.String resourceName, ContentType contentType, java.lang.ClassLoader classLoader)
resourceName
- (undocumented)contentType
- (undocumented)classLoader
- (undocumented)scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> getFromDirectory(java.lang.String directoryName, ContentTypeResolver resolver)
directoryName
- (undocumented)resolver
- (undocumented)scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> listDirectoryContents(scala.collection.immutable.Seq<java.lang.String> directories, FileAndResourceDirectives.DirectoryRenderer renderer)
Marshaller[DirectoryListing]
.
directories
- (undocumented)renderer
- (undocumented)scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> getFromBrowseableDirectory(java.lang.String directory, FileAndResourceDirectives.DirectoryRenderer renderer, ContentTypeResolver resolver)
getFromBrowseableDirectories
with only one directory.
directory
- (undocumented)renderer
- (undocumented)resolver
- (undocumented)scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> getFromBrowseableDirectories(scala.collection.immutable.Seq<java.lang.String> directories, FileAndResourceDirectives.DirectoryRenderer renderer, ContentTypeResolver resolver)
directories
- (undocumented)renderer
- (undocumented)resolver
- (undocumented)scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>> getFromResourceDirectory(java.lang.String directoryName, java.lang.ClassLoader classLoader, ContentTypeResolver resolver)
directoryName
- (undocumented)classLoader
- (undocumented)resolver
- (undocumented)java.lang.ClassLoader _defaultClassLoader()