(xml: Record<string, any>)
| 80 | } |
| 81 | |
| 82 | export function getPropertyNames(xml: Record<string, any>): string[] { |
| 83 | const propFindElement = xml['D:propfind'] || xml.propfind; |
| 84 | if (!propFindElement) { |
| 85 | return ['allprop']; |
| 86 | } |
| 87 | |
| 88 | const propElement = propFindElement['D:prop'] || propFindElement.prop; |
| 89 | if (!propElement) { |
| 90 | return []; |
| 91 | } |
| 92 | |
| 93 | const propertyNames: string[] = []; |
| 94 | for (const key in propElement) { |
| 95 | if (Object.hasOwn(propElement, key)) { |
| 96 | propertyNames.push(key.replace('D:', '')); |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | return propertyNames; |
| 101 | } |
| 102 | |
| 103 | function encodeFilePath(filePath: string) { |
| 104 | const encoded = encodeURIComponent(filePath) |
no outgoing calls
no test coverage detected