int flags = request.getFlags();
// attrs
SshFile file = resolveFile(path);
switch (flags & SSH_FXF_ACCESS_DISPOSITION) {
case SSH_FXF_CREATE_NEW: {
if (file.doesExist()) {
return new SshFxpStatusReply(id, SSH_FX_FILE_ALREADY_EXISTS, path);
} else if (!file.isWritable()) {
return new SshFxpStatusReply(id, SSH_FX_PERMISSION_DENIED, "Can not create " + path);
}
file.create();