public interface HttpVfs
HttpFileService.| Modifier and Type | Method and Description |
|---|---|
boolean |
canList(String path)
Returns whether the file at the specified
path is a directory. |
HttpFile |
get(String path,
Clock clock,
String contentEncoding,
HttpHeaders additionalHeaders)
Finds the file at the specified
path. |
List<String> |
list(String path)
Lists the files at the specified directory
path non-recursively. |
String |
meterTag()
|
static HttpVfs |
ofClassPath(ClassLoader classLoader,
String rootDir)
Creates a new
HttpVfs with the specified rootDir in the current class path. |
static HttpVfs |
ofClassPath(String rootDir)
Creates a new
HttpVfs with the specified rootDir in the current class path. |
static HttpVfs |
ofFileSystem(Path rootDir)
Creates a new
HttpVfs with the specified rootDir in an O/S file system. |
static HttpVfs |
ofFileSystem(String rootDir)
Creates a new
HttpVfs with the specified rootDir in an O/S file system. |
static HttpVfs ofFileSystem(String rootDir)
HttpVfs with the specified rootDir in an O/S file system.static HttpVfs ofFileSystem(Path rootDir)
HttpVfs with the specified rootDir in an O/S file system.static HttpVfs ofClassPath(String rootDir)
HttpVfs with the specified rootDir in the current class path.static HttpVfs ofClassPath(ClassLoader classLoader, String rootDir)
HttpVfs with the specified rootDir in the current class path.HttpFile get(String path, Clock clock, @Nullable String contentEncoding, HttpHeaders additionalHeaders)
path.path - an absolute path whose component separator is '/'clock - the Clock which provides the current date and timecontentEncoding - the desired 'content-encoding' header value of the file.
null to omit the header.additionalHeaders - the additional HTTP headers to add to the returned HttpFile.HttpFile at the specified pathboolean canList(String path)
path is a directory.path - an absolute path whose component separator is '/'.true if the file is a directory. false if the directory does not exist or
the file listing is not available.List<String> list(String path)
path non-recursively.path - an absolute path whose component separator is '/'.'/'. If the directory does not exist or the file listing is not available,
an empty List is returned.String meterTag()
Copyright © 2020 LeanCloud. All rights reserved.