getFolderContents :: DP.Folder -> ApiAction (Map Path RemoteFile)
getFolderContents folder = do
    (manager, aToken, _, _) <- ask
    folderLink <- liftIO $ linkOrException "self" $ DP.folderLinks folder
    fullFolder <- liftResourceT $ getFolder aToken manager folderLink
    let folderDocuments = filter DP.uploaded (DP.documentInFolder fullFolder)
    let dir = (pathFromFolder folder, remoteDirFromFolder folder)
    let files = map (mapFileToRemoteFile folder) folderDocuments
    return $ Map.fromList (dir : files)
getFolderContents :: DP.Folder -> ApiAction (Map Path RemoteFile)
getFolderContents folder = do
    (manager, aToken, _, _) <- ask
    folderLink <- liftIO $ linkOrException "self" $ DP.folderLinks folder
    fullFolder <- liftResourceT $ getFolder aToken manager folderLink
    let folderDocuments = filter DP.uploaded (DP.documentInFolder fullFolder)
    let dir = (pathFromFolder folder, remoteDirFromFolder folder)
    let files = map (mapFileToRemoteFile folder) folderDocuments
    return $ Map.fromList (dir : files)
getFolderContents folder = do
    (manager, aToken, _, _) <- ask
    folderLink <- liftIO $ linkOrException "self" $ DP.folderLinks folder
    fullFolder <- liftResourceT $ getFolder aToken manager folderLink
    let folderDocuments = filter DP.uploaded (DP.documentInFolder fullFolder)
    let dir = (pathFromFolder folder, remoteDirFromFolder folder)
    let files = map (mapFileToRemoteFile folder) folderDocuments
    return $ Map.fromList (dir : files)