diff --git a/src/Tahoe/Download.hs b/src/Tahoe/Download.hs
index dc62783b6736595a6eea27c9605e9caa5d5ab7ec..c5a64c489b48c40d25d91389e5b2c3666159e471 100644
--- a/src/Tahoe/Download.hs
+++ b/src/Tahoe/Download.hs
@@ -229,3 +229,29 @@ downloadShare storageIndex (shareNum, s) = do
     let massaged = first (ShareDownloadError . (displayException :: SomeException -> String)) shareBytes
     print' "Downloaded it"
     pure (shareNum, LB.fromStrict <$> massaged)
+
+{- | Download the data associated with a directory capability and interpret it
+ as a collection of entries.
+-}
+downloadDirectory ::
+    (MonadIO m, Readable readCap, Verifiable v, Verifier readCap ~ v) =>
+    -- | Information about the servers from which to consider downloading shares
+    -- representing the application data.
+    Map.Map StorageServerID StorageServerAnnouncement ->
+    -- | The read capability for the application data.
+    DirectoryCapability readCap ->
+    -- | Get functions for interacting with a server given its URL.
+    LookupServer m ->
+    -- | Either a description of how the recovery failed or the recovered
+    -- application data.
+    m (Either DirectoryDownloadError Directory)
+downloadDirectory anns (DirectoryCapability cap) lookupServer = do
+    bs <- download anns cap lookupServer
+    pure $ do
+        bs' <- first UnderlyingDownloadError bs
+        first (const DecodingError) $ Directory.parse (LB.toStrict bs')
+
+data DirectoryDownloadError
+    = UnderlyingDownloadError DownloadError
+    | DecodingError
+    deriving (Ord, Eq, Show)