@Path(value="/") @Produces(value="application/json") public class FileServer extends Object
| Constructor and Description |
|---|
FileServer() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
createDirectory(String filePath) |
javax.ws.rs.core.Response |
createFile(String filePath) |
javax.ws.rs.core.Response |
deleteFile(String filePath) |
javax.ws.rs.core.Response |
file(String filePath) |
Map<String,Object> |
info(String filePath) |
Object |
list() |
Object |
list(String filePath) |
javax.ws.rs.core.Response |
move(String source,
String target) |
void |
setServletContext(javax.servlet.ServletContext context) |
javax.ws.rs.core.Response |
upload(String filePath,
byte[] content) |
@Context
public void setServletContext(javax.servlet.ServletContext context)
throws IOException
IOException@GET @Path(value="list") public Object list() throws IOException
IOException@GET
@Path(value="list/{filePath: .*}")
public Object list(@PathParam(value="filePath")
String filePath)
throws IOException
IOException@GET
@Path(value="info/{filePath: .*}")
public Map<String,Object> info(@PathParam(value="filePath")
String filePath)
throws IOException
IOException@GET
@Path(value="download/{filePath: .*}")
@Produces(value="application/octet-stream")
public javax.ws.rs.core.Response file(@PathParam(value="filePath")
String filePath)
@GET
@Path(value="createDirectory/{filePath: .*}")
public javax.ws.rs.core.Response createDirectory(@PathParam(value="filePath")
String filePath)
throws IOException
IOException@GET
@Path(value="createFile/{filePath: .*}")
public javax.ws.rs.core.Response createFile(@PathParam(value="filePath")
String filePath)
throws IOException
IOException@GET
@Path(value="move/{filePath: .*}")
public javax.ws.rs.core.Response move(@PathParam(value="filePath")
String source,
@QueryParam(value="target")
String target)
throws IOException
IOException@DELETE
@Path(value="deleteFile/{filePath: .*}")
public javax.ws.rs.core.Response deleteFile(@PathParam(value="filePath")
String filePath)
throws IOException
IOException@POST
@Path(value="upload/{filePath: .*}")
@Consumes(value="application/octet-stream")
public javax.ws.rs.core.Response upload(@PathParam(value="filePath")
String filePath,
byte[] content)
throws IOException
IOExceptionCopyright © 2020 LSST. All rights reserved.