Class LogsResource.FileResource
java.lang.Object
org.apache.juneau.microservice.examples.LogsResource.FileResource
- Enclosing class:
- LogsResource
@Response(schema=@Schema(description="File or directory details"))
@BeanType(properties="type,name,size,lastModified,actions,files")
public static class LogsResource.FileResource
extends Object
File or directory details for REST response.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the read actions for this file: view, highlighted, parsed and download.getFiles()Returns child files when this is a directory and includeChildren istrue .Returns the last modified date of the file.getName()Returns the file name as a link.longgetSize()Returns the file size, or number of items for directories.getType()Returns the type: "dir" or "file".
-
Constructor Details
-
FileResource
Constructor.- Parameters:
f- The file or directory.path- The path.includeChildren- Whether to include child files.
-
-
Method Details
-
getActions
Returns the read actions for this file: view, highlighted, parsed and download.Every action is a plain
GETlink. There is no delete action: a delete is aDELETErequest, which a link cannot send.- Returns:
- The list of actions.
-
getFiles
Returns child files when this is a directory and includeChildren istrue .- Returns:
- Child files, or
null when this is a file or includeChildren is false.
-
getLastModified
Returns the last modified date of the file.- Returns:
- The last modified date as an
Instant.
-
getName
Returns the file name as a link.- Returns:
- The name as a link.
-
getSize
Returns the file size, or number of items for directories.- Returns:
- The size.
-
getType
Returns the type: "dir" or "file".- Returns:
- The type.
-