Skip to content

Commit 0bec26c

Browse files
authored
[Cleanup] Remove api.listUserData (#3632)
1 parent 45eb470 commit 0bec26c

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

src/scripts/api.ts

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -882,52 +882,6 @@ export class ComfyApi extends EventTarget {
882882
return resp
883883
}
884884

885-
/**
886-
* @overload
887-
* Lists user data files for the current user
888-
* @param { string } dir The directory in which to list files
889-
* @param { boolean } [recurse] If the listing should be recursive
890-
* @param { true } [split] If the paths should be split based on the os path separator
891-
* @returns { Promise<string[][]> } The list of split file paths in the format [fullPath, ...splitPath]
892-
*/
893-
/**
894-
* @overload
895-
* Lists user data files for the current user
896-
* @param { string } dir The directory in which to list files
897-
* @param { boolean } [recurse] If the listing should be recursive
898-
* @param { false | undefined } [split] If the paths should be split based on the os path separator
899-
* @returns { Promise<string[]> } The list of files
900-
*/
901-
async listUserData(
902-
dir: string,
903-
recurse: boolean,
904-
split?: true
905-
): Promise<string[][]>
906-
async listUserData(
907-
dir: string,
908-
recurse: boolean,
909-
split?: false
910-
): Promise<string[]>
911-
/**
912-
* @deprecated Use `listUserDataFullInfo` instead.
913-
*/
914-
async listUserData(dir: string, recurse: boolean, split?: boolean) {
915-
const resp = await this.fetchApi(
916-
`/userdata?${new URLSearchParams({
917-
recurse: recurse ? 'true' : 'false',
918-
dir,
919-
split: split ? 'true' : 'false'
920-
})}`
921-
)
922-
if (resp.status === 404) return []
923-
if (resp.status !== 200) {
924-
throw new Error(
925-
`Error getting user data list '${dir}': ${resp.status} ${resp.statusText}`
926-
)
927-
}
928-
return resp.json()
929-
}
930-
931885
async listUserDataFullInfo(dir: string): Promise<UserDataFullInfo[]> {
932886
const resp = await this.fetchApi(
933887
`/userdata?dir=${encodeURIComponent(dir)}&recurse=true&split=false&full_info=true`

0 commit comments

Comments
 (0)