private Reply doProcessRemove(SshFxpRemoveRequest request) throws IOException {
int id = request.getId();
String path = request.getPath();
SshFile p = resolveFile(path);
if (!p.doesExist()) {
return new SshFxpStatusReply(id, SSH_FX_NO_SUCH_FILE, p.getAbsolutePath());
} else if (p.isDirectory()) {
return new SshFxpStatusReply(id, SSH_FX_FILE_IS_A_DIRECTORY, p.getAbsolutePath());
} else if (!p.delete()) {
return new SshFxpStatusReply(id, SSH_FX_FAILURE, "Failed to delete file");