File upload ui, creating folders, automatic reload
This commit is contained in:
@ -12,8 +12,9 @@ class ListFiles extends WebdavApi<ListFilesParams> {
|
||||
|
||||
@override
|
||||
Future<ListFilesResponse> run() async {
|
||||
//Set<CacheableFile> files = (await (await WebdavApi.webdav).ls(params.path)).map((e) => CacheableFile.fromDavFile(e)).toSet();
|
||||
Set<CacheableFile> files = (await (await WebdavApi.webdav).ls(params.path)).toWebDavFiles((await WebdavApi.webdav)).map((e) => CacheableFile.fromDavFile(e)).toSet();
|
||||
List<WebDavFile> davFiles = (await (await WebdavApi.webdav).ls(params.path)).toWebDavFiles((await WebdavApi.webdav));
|
||||
davFiles.removeWhere((element) => element.path == "/${params.path}/" || element.path == "/"); // somehow the current working folder is also listed, it is filtered here.
|
||||
Set<CacheableFile> files = davFiles.map((e) => CacheableFile.fromDavFile(e)).toSet();
|
||||
|
||||
return ListFilesResponse(files);
|
||||
}
|
||||
|
Reference in New Issue
Block a user