echo '{"success":false,"error":"Cannot read file: ' . $_POST['path'] . '"}';
             } elseif ($_POST['dest'] and $server->put($_POST['dest'], $content)) {
                 echo '{"success":true}';
             } else {
                 echo '{"success":false,"error":"Cannot create file: ' . $_POST['dest'] . '"}';
             }
         }
         if ($_POST['path'] and $_POST['cut'] == 'true') {
             $server_src->delete($_POST['path']);
         }
     }
     break;
 case 'delete':
     $file = $_POST['file'];
     if (!$server->is_dir($file)) {
         if ($server->delete($file)) {
             echo '{"success":true}';
         } else {
             echo '{"success":false,"error":"Cannot delete file: ' . end($server->log) . '"}';
         }
     } else {
         if ($server->delete($file)) {
             echo '{"success":true}';
         } else {
             echo '{"success":false,"error":"Cannot delete directory: ' . end($server->log) . '"}';
         }
     }
     break;
 case 'upload':
     $response = array();
     $response['success'] = true;