public interface FileResolver extends Closeable
In this case we want the application to access the resource from the classpath as if it was on the file system.
We can do this by looking for the file on the classpath, and if found, copying it to a temporary cache directory on disk and serving it from there.
There is one cache dir per Vert.x instance which is deleted on Vert.x shutdown.
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this file resolver, this is a blocking operation.
|
File |
resolveFile(String fileName)
Resolve the file for the specified
fileName . |
File resolveFile(String fileName)
fileName
.
This method should never return null
, it can return a file that does not exist.fileName
- the name to resolvevoid close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
IOException
Copyright © 2023 Eclipse. All rights reserved.