timestee / dart-webdav

A Easy WebDAV Client in Dart
https://github.com/timestee/dart-webdav
The Unlicense
28 stars 14 forks source link

Fix Issue #3 and rewrote the "treeFromWebDavXml" method #4

Closed hauketoenjes closed 5 years ago

hauketoenjes commented 5 years ago

Hey,

i fixed the bug described in Issue #3 where to many "/" appeared in the url. Also i rewrote the method "treeFromWebDavXml" to parse the xml now directly instead of parsing it to json first. The method is by far not optimal or any good, but it does the job in the first place. The method does not support all the functionality webdav can offer and should be extended to support custom props etc.

The pull request also includes an adaptation of the FileInfo class since it was not clear what "name" meant since it represented the file/folder path. Now it can give information about the file path and file name separately and can give a boolean if it is a directory or not (adapted the old method cause it is probably easier to just look at the end of the path for a "/").

Hauke Tönjes