Package com.linecorp.armeria.server.file
Class AbstractHttpVfs
java.lang.Object
com.linecorp.armeria.server.file.AbstractHttpVfs
- All Implemented Interfaces:
HttpVfs
- Direct Known Subclasses:
AbstractBlockingHttpVfs
A skeletal
HttpVfs
implementation.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns whether the file at the specifiedpath
is a listable directory.Lists the files at the specified directorypath
non-recursively.toString()
Returns theHttpVfs.meterTag()
of thisHttpVfs
.
-
Constructor Details
-
AbstractHttpVfs
public AbstractHttpVfs()
-
-
Method Details
-
canList
Description copied from interface:HttpVfs
Returns whether the file at the specifiedpath
is a listable directory.- Specified by:
canList
in interfaceHttpVfs
- Parameters:
fileReadExecutor
- theExecutor
which will perform the read operations against the filepath
- an absolute path that starts with'/'
, whose component separator is'/'
- Returns:
- the
CompletableFuture
that will be completed withtrue
if the file is a listable directory. It will be completed withfalse
if the directory does not exist or the file listing is not available.
-
list
Description copied from interface:HttpVfs
Lists the files at the specified directorypath
non-recursively.- Specified by:
list
in interfaceHttpVfs
- Parameters:
fileReadExecutor
- theExecutor
which will perform the read operations against the filepath
- an absolute path that starts with'/'
, whose component separator is'/'
- Returns:
- the
CompletableFuture
that will be completed with the list of the file names. If the file is a directory, the file name will end with'/'
. If the directory does not exist or the file listing is not available, it will be completed with an emptyList
.
-
toString
Returns theHttpVfs.meterTag()
of thisHttpVfs
.
-