withRawDeviceStoreFiles :: [FilePath] -> ([LocalStoreFile] -> IO a) -> ExceptT String IO a
withRawDeviceStoreFiles ps user = foldr (\p u fs ->  (>>= ExceptT . pure) $ withRawDeviceStoreFile p $ \f -> runExceptT $ u $ fs `mappend` [f]) (lift . user) ps []
withRawDeviceStoreFiles :: [FilePath] -> ([LocalStoreFile] -> IO a) -> ExceptT String IO a
withRawDeviceStoreFiles ps user = foldr (\p u fs ->  (>>= ExceptT . pure) $ withRawDeviceStoreFile p $ \f -> runExceptT $ u $ fs `mappend` [f]) (lift . user) ps []
withRawDeviceStoreFiles ps user = foldr (\p u fs ->  (>>= ExceptT . pure) $ withRawDeviceStoreFile p $ \f -> runExceptT $ u $ fs `mappend` [f]) (lift . user) ps []