$new_copy_target = '/copy of wdc test 2 folder'; $http_status = $wdc->copy_coll($test_folder, $new_copy_target, true); print 'webdav server returns ' . $http_status . '<br>'; // --- print 'Let\'s move/rename a file in a collection<br>'; $new_target_path = $test_folder . '/picture renamed.jpg'; $http_status = $wdc->move($target_path, $new_target_path, true); print 'webdav server returns ' . $http_status . '<br>'; // --- print 'Let\'s move/rename a collection<br>'; $new_target_folder = '/wdc test 2 folder renamed'; $http_status = $wdc->move($test_folder, $new_target_folder, true); print 'webdav server returns ' . $http_status . '<br>'; // --- print 'Let\'s lock this moved collection<br>'; $http_status_array = $wdc->lock($new_target_folder); print 'webdav server returns ' . $http_status_array['status'] . '<br>'; print 'locktocken is ' . $http_status_array[0]['locktoken'] . '<br>'; print 'Owner of lock is ' . $http_status_array[0]['owner'] . '<br>'; // --- print 'Let\'s unlock this collection with a wrong locktoken<br>'; $http_status = $wdc->unlock($new_target_folder, 'wrongtoken'); print "webdav server returns {$http_status}<br>"; print 'Let\'s unlock this collection with the right locktoken<br>'; $http_status = $wdc->unlock($new_target_folder, $http_status_array[0]['locktoken']); print 'webdav server returns ' . $http_status . '<br>'; // -- print 'Let\'s remove/delete the moved collection ' . $new_target_folder . '<br>'; $http_status_array = $wdc->delete($new_target_folder); print 'webdav server returns ' . $http_status_array['status'] . '<br>'; // --