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

Function getProperDestinationPath

lib/utils/webdav.ts:4–7  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

2import { lookup } from 'mrmime';
3
4export function getProperDestinationPath(url: string) {
5 const decodedPathname = decodeURIComponent(new URL(url).pathname);
6 return decodedPathname.replace(/^\/dav\//, '');
7}
8
9// Pulls lock tokens out of an `If` header (RFC 4918 §10.4), ignoring its etag/resource-tag parts.
10export function getLockTokensFromIfHeader(ifHeader: string | null): string[] {

Callers 2

handlerFunction · 0.90
webdav_test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected