At this moment the listDirectoryContents function returns [Text]
and in getEntryOrDir we rely on the fact that vault adds a '/'
to the directory. But other backends might not behave like this.
Solution
Created new data DirectoryContents which stores 2 lists:
list with directories
list with entries
and changed return type from Maybe [Text] to Maybe DirectoryContents
in listDirectoryContents function.
Related issue(s)
Fixes #106
Fixed #
:white_check_mark: Checklist for your Pull Request
Related changes (conditional)
Tests
[ ] If I added new functionality, I added tests covering it.
[ ] If I fixed a bug, I added a regression test to prevent the bug from
silently reappearing again.
Documentation
[x] I checked whether I should update the docs and did so if necessary:
Description
Problem
At this moment the
listDirectoryContents
function returns[Text]
and ingetEntryOrDir
we rely on the fact thatvault
adds a '/' to the directory. But other backends might not behave like this.Solution
Created new data
DirectoryContents
which stores 2 lists:Maybe [Text]
toMaybe DirectoryContents
inlistDirectoryContents
function.Related issue(s)
Fixed #
:white_check_mark: Checklist for your Pull Request
Related changes (conditional)
Tests
Documentation
Stylistic guide (mandatory)