project BLF > class TDocumentLink > method CreateCollection
Description
MKCOL method : create a collection
Parameters
Internal usage
BLF
program code (program1/tdocumentlink.p)
<M-81 run Connect () in TDocumentLink>
if vcWebdavResponse <> ""
then return.
vcommand = "MKCOL " + icPath + " HTTP/1.0" + "~n~n".
set-size (vmSend) = length (vcommand,"RAW") + 1.
put-string (vmSend,1) = vcommand.
vhWebdavSocket:write (vmSend,1,get-size(vmSend)).
wait-for read-response of vhWebdavSocket pause 60.
if index (vcWebdavResponse," 201 ") > 0 /* CREATED */
then vcWebdavResponse = "".
finally:
set-size (vmSend) = 0.
if vhWebdavSocket <> ?
then do:
vhWebdavSocket:disconnect ().
delete object vhWebdavSocket.
vhWebdavSocket = ?.
end.
end finally.