MCPcopy Create free account
hub / github.com/bewcloud/bewcloud / lockPath

Function lockPath

pages/dav_test.ts:49–55  ·  view source on GitHub ↗
(filePath: string, user: User, depth?: string)

Source from the content-addressed store, hash-verified

47 `<?xml version="1.0" encoding="utf-8"?><D:lockinfo xmlns:D="DAV:"><D:lockscope><D:exclusive/></D:lockscope><D:locktype><D:write/></D:locktype><D:owner><D:href>test-owner</D:href></D:owner></D:lockinfo>`;
48
49async function lockPath(filePath: string, user: User, depth?: string): Promise<Response> {
50 const headers: Record<string, string> = {};
51 if (depth) {
52 headers.depth = depth;
53 }
54 return await callDav('LOCK', filePath, user, { body: lockRequestBody, headers });
55}
56
57function getLockTokenFromResponse(response: Response): string {
58 const lockTokenHeader = response.headers.get('lock-token') || '';

Callers 1

dav_test.tsFile · 0.85

Calls 1

callDavFunction · 0.85

Tested by

no test coverage detected