Skip to content

Commit

Permalink
Merge pull request #373 from JammingBen/feat/export_prepare_file_from…
Browse files Browse the repository at this point in the history
…_props

feat: export the prepareFileFromProps method
  • Loading branch information
perry-mitchell committed Apr 24, 2024
2 parents cab4e0b + d0dc998 commit 36601f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion source/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
7 changes: 7 additions & 0 deletions source/tools/dav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,13 @@ export function parseXML(xml: string): Promise<DAVResult> {
});
}

/**
* 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,
Expand Down

0 comments on commit 36601f9

Please sign in to comment.