org.apache.catalina.WebResourceSet based on a single file.
| Access | Constructor and Description |
|---|---|
| public | |
| public | FileResourceSet(WebResourceRoot
The root, String WebResourceRoot this new org. will be added
to.The path within the web application at which this webAppMount, String org.
will be mounted. For example, to add a directory of JARs to a web application, the
directory would be mounted at "WEB-INF/lib/"The absolute path to the file on the file system from which the resource will be served. base, String The path within this new internalPath)org. where resources will be
served from.Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| protected void | checkType(File file)
Implements abstract org.
|
| public WebResource | getResource(String
The path for the resource of interest relative to the root
of the web application. It must start with '/'. path)Implements org. Obtain the object that represents the resource at the given path. |
| public String[] | list(String
The path for the resource of interest relative to the root
of the web application. It must start with '/'. path)Implements org. Obtain the list of the names of all of the files and directories located in the specified directory. |
| public Set | listWebAppPaths(String
The path for the resource of interest relative to the root
of the web application. It must start with '/'. path)Implements org. Obtain the Set of the web applications pathnames of all of the files and directories located in the specified directory. |
| public boolean | mkdir(String
The path for the new resource to create relative to the root
of the web application. It must start with '/'. path)Implements org. Create a new directory at the given path. |
| public boolean | write(String
The path to be used for the new Resource. It is relative
to the root of the web application and must start with
'/'. path, InputStream The InputStream that will provide the content for the
new Resource. is, boolean If overwrite)true and the resource already exists it
will be overwritten. If false and the
resource already exists the write will fail.Implements org. Create a new resource at the requested path using the provided InputStream. |
| FileResourceSet | back to summary |
|---|---|
| public FileResourceSet() A no argument constructor is required for this to work with the digester. | |
| FileResourceSet | back to summary |
|---|---|
| public FileResourceSet(WebResourceRoot root, String webAppMount, String base, String internalPath) Creates a new
| |
| checkType | back to summary |
|---|---|
| protected void checkType(File file) Implements abstract org.
| |
| getResource | back to summary |
|---|---|
| public WebResource getResource(String path) Implements org. Doc from org. Obtain the object that represents the resource at the given path. Note the resource at that path may not exist.
| |
| list | back to summary |
|---|---|
| public String[] list(String path) Implements org. Doc from org. Obtain the list of the names of all of the files and directories located in the specified directory. | |
| listWebAppPaths | back to summary |
|---|---|
| public Set Implements org. Doc from org. Obtain the Set of the web applications pathnames of all of the files and directories located in the specified directory. Paths representing directories will end with a "/" character. | |
| mkdir | back to summary |
|---|---|
| public boolean mkdir(String path) Implements org. Doc from org. Create a new directory at the given path. | |
| write | back to summary |
|---|---|
| public boolean write(String path, InputStream is, boolean overwrite) Implements org. Doc from org. Create a new resource at the requested path using the provided InputStream.
| |