@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,
javax.ws.rs.core.Request request) |
javax.ws.rs.core.Response |
info(String filePath,
javax.ws.rs.core.Request request) |
javax.ws.rs.core.Response |
list(javax.ws.rs.core.Request request) |
javax.ws.rs.core.Response |
list(String filePath,
javax.ws.rs.core.Request request) |
javax.ws.rs.core.Response |
move(String source,
String target) |
void |
setServletContext(javax.servlet.ServletContext context) |
javax.ws.rs.core.Response |
upload(String filePath,
List<String> openOptions,
byte[] content) |
@Context
public void setServletContext(javax.servlet.ServletContext context)
throws IOException
IOException@GET
@Path(value="list")
public javax.ws.rs.core.Response list(@Context
javax.ws.rs.core.Request request)
throws IOException
IOException@GET
@Path(value="list/{filePath: .*}")
public javax.ws.rs.core.Response list(@PathParam(value="filePath")
String filePath,
@Context
javax.ws.rs.core.Request request)
throws IOException
IOException@GET
@Path(value="info/{filePath: .*}")
public javax.ws.rs.core.Response info(@PathParam(value="filePath")
String filePath,
@Context
javax.ws.rs.core.Request request)
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,
@Context
javax.ws.rs.core.Request request)
throws IOException
IOException@POST
@Path(value="createDirectory/{filePath: .*}")
public javax.ws.rs.core.Response createDirectory(@PathParam(value="filePath")
String filePath)
throws IOException
IOException@POST
@Path(value="createFile/{filePath: .*}")
public javax.ws.rs.core.Response createFile(@PathParam(value="filePath")
String filePath)
throws IOException
IOException@POST
@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,
@QueryParam(value="openOption")
List<String> openOptions,
byte[] content)
throws IOException
IOExceptionCopyright © 2023 LSST. All rights reserved.