diff --git a/source/index.ts b/source/index.ts index 414d404..d2c9c55 100644 --- a/source/index.ts +++ b/source/index.ts @@ -2,5 +2,5 @@ export { createClient } from "./factory.js"; export { getPatcher } from "./compat/patcher.js"; export * from "./types.js"; -export { parseStat, parseXML, translateDiskSpace } from "./tools/dav.js"; +export { parseStat, parseXML, translateDiskSpace, prepareFileFromProps } from "./tools/dav.js"; export { processResponsePayload } from "./response.js"; diff --git a/source/tools/dav.ts b/source/tools/dav.ts index 55fefcd..367ef2e 100644 --- a/source/tools/dav.ts +++ b/source/tools/dav.ts @@ -108,6 +108,13 @@ export function parseXML(xml: string): Promise { }); } +/** + * Get a file stat result from given DAV properties + * @param props DAV properties + * @param filename The filename for the file stat + * @param isDetailed Whether or not the raw props of the resource should be returned + * @returns A file stat result + */ export function prepareFileFromProps( props: DAVResultResponseProps, filename: string,