String path = request.getPath();
// attrs
SshFile p = resolveFile(path);
if (p.isDirectory()) {
if (p.doesExist()) {
if (p.listSshFiles().size() == 0) {
if (p.delete()) {
return new SshFxpStatusReply(id, SSH_FX_OK, "");
} else {
return new SshFxpStatusReply(id, SSH_FX_FAILURE, "Unable to delete directory " + path);
}