Class DirectoryResource

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.apache.juneau.rest.servlet.RestServlet
org.apache.juneau.rest.servlet.BasicRestServlet
org.apache.juneau.microservice.resources.DirectoryResource
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable, BasicUniversalConfig, DefaultConfig, DefaultHtmlConfig, BasicRestOperations

public class DirectoryResource extends BasicRestServlet
REST resource that allows access to a file system directory.

The root directory is specified in one of two ways:

  • Specifying the location via a DirectoryResource.rootDir property.
  • Overriding the getRootDir() method.

Read/write access control is handled through the following properties:

  • DirectoryResource.allowViews - If true, allows view and download access to files.
  • DirectoryResource.allowUploads - If true, allows files to be created or overwritten.
  • DirectoryResource.allowDeletes - If true, allows files to be deleted.
See Also: