diff --git a/packages/neon/neon_files/lib/blocs/browser.dart b/packages/neon/neon_files/lib/blocs/browser.dart index 8b379847..933a1464 100644 --- a/packages/neon/neon_files/lib/blocs/browser.dart +++ b/packages/neon/neon_files/lib/blocs/browser.dart @@ -44,9 +44,9 @@ class FilesBrowserBloc extends InteractiveBloc implements FilesBrowserBlocEvents client.id, 'files-${path.value.join('/')}', files, - () async => client.webdav.ls( + () async => client.webdav.propfind( path.value.join('/'), - prop: WebDavPropfindProp.fromBools( + prop: WebDavPropWithoutValues.fromBools( davgetcontenttype: true, davgetetag: true, davgetlastmodified: true, @@ -69,11 +69,6 @@ class FilesBrowserBloc extends InteractiveBloc implements FilesBrowserBlocEvents @override void createFolder(final List path) { - wrapAction( - () async => client.webdav.mkdir( - path.join('/'), - safe: false, - ), - ); + wrapAction(() async => client.webdav.mkcol(path.join('/'))); } } diff --git a/packages/neon/neon_files/lib/blocs/files.dart b/packages/neon/neon_files/lib/blocs/files.dart index 47213f79..005d74f6 100644 --- a/packages/neon/neon_files/lib/blocs/files.dart +++ b/packages/neon/neon_files/lib/blocs/files.dart @@ -65,7 +65,12 @@ class FilesBloc extends InteractiveBloc implements FilesBlocEvents, FilesBlocSta @override void addFavorite(final List path) { - wrapAction(() async => client.webdav.updateProps(path.join('/'), WebDavProp(ocfavorite: 1))); + wrapAction( + () async => client.webdav.proppatch( + path.join('/'), + set: WebDavProp(ocfavorite: 1), + ), + ); } @override @@ -119,9 +124,9 @@ class FilesBloc extends InteractiveBloc implements FilesBlocEvents, FilesBlocSta @override void removeFavorite(final List path) { wrapAction( - () async => client.webdav.updateProps( + () async => client.webdav.proppatch( path.join('/'), - WebDavProp(ocfavorite: 0), + set: WebDavProp(ocfavorite: 0), ), ); } diff --git a/packages/neon/neon_files/lib/utils/download_task.dart b/packages/neon/neon_files/lib/utils/download_task.dart index 0e509f2c..424fc04a 100644 --- a/packages/neon/neon_files/lib/utils/download_task.dart +++ b/packages/neon/neon_files/lib/utils/download_task.dart @@ -13,7 +13,7 @@ class DownloadTask { Future execute(final NextcloudClient client, final IOSink sink) async { final completer = Completer(); - final response = await client.webdav.downloadStream(path.join('/')); + final response = await client.webdav.getStream(path.join('/')); var downloaded = 0; response.listen((final chunk) async { diff --git a/packages/neon/neon_files/lib/utils/upload_task.dart b/packages/neon/neon_files/lib/utils/upload_task.dart index 9299b0d2..905f9caf 100644 --- a/packages/neon/neon_files/lib/utils/upload_task.dart +++ b/packages/neon/neon_files/lib/utils/upload_task.dart @@ -16,7 +16,7 @@ class UploadTask { Future execute(final NextcloudClient client, final Stream> stream) async { var uploaded = 0; - await client.webdav.uploadStream( + await client.webdav.putStream( stream.map((final chunk) { uploaded += chunk.length; _streamController.add((uploaded / size * 100).toInt());