public interface HttpVfs
FileService.| 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 |
of(ClassLoader classLoader,
String rootDir)
Creates a new
HttpVfs with the specified rootDir in the current class path. |
static HttpVfs |
of(File rootDir)
Creates a new
HttpVfs with the specified rootDir in an O/S file system. |
static HttpVfs |
of(Path rootDir)
Creates a new
HttpVfs with the specified rootDir in an O/S file system. |
static HttpVfs |
ofClassPath(ClassLoader classLoader,
String rootDir)
Deprecated.
|
static HttpVfs |
ofClassPath(String rootDir)
Deprecated.
|
static HttpVfs |
ofFileSystem(Path rootDir)
Deprecated.
Use
of(Path). |
static HttpVfs |
ofFileSystem(String rootDir)
Deprecated.
Use
of(Path). |
static HttpVfs of(File rootDir)
HttpVfs with the specified rootDir in an O/S file system.static HttpVfs of(Path rootDir)
HttpVfs with the specified rootDir in an O/S file system.static HttpVfs of(ClassLoader classLoader, String rootDir)
HttpVfs with the specified rootDir in the current class path.@Deprecated static HttpVfs ofFileSystem(String rootDir)
of(Path).HttpVfs with the specified rootDir in an O/S file system.@Deprecated static HttpVfs ofFileSystem(Path rootDir)
of(Path).HttpVfs with the specified rootDir in an O/S file system.@Deprecated static HttpVfs ofClassPath(String rootDir)
of(ClassLoader, String).HttpVfs with the specified rootDir in the current class path.@Deprecated static HttpVfs ofClassPath(ClassLoader classLoader, String rootDir)
of(ClassLoader, String).HttpVfs with the specified rootDir in the current class path.HttpFile get(String path, Clock clock, String contentEncoding, HttpHeaders additionalHeaders)
path.path - an absolute path that starts with '/', 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 that starts with '/', 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 that starts with '/', 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.