Purify file operations
Factor out storeFile, unstoreFile, and verifyFile into a MTL style class. This class can provide its own Id type, and never returns FilePaths directly, which should allow a memory-only variant for testing purposes later. Control of storage ids now belongs to MonadFileStore. It was not really the place of the data layer (which is currently a set of SQL queries) to suddenly do one arbitrary file IO operation.
This commit is contained in:
parent
d2016d1863
commit
dd7a1b8970
11 changed files with 143 additions and 83 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -12,6 +12,7 @@
|
|||
!src/CAStore/Config.hs
|
||||
!src/CAStore/Config/Type.hs
|
||||
!src/CAStore/Config/CLI.hs
|
||||
!src/CAStore/FileStore.hs
|
||||
!src/CAStore/Program.hs
|
||||
!src/CAStore/Program/Internal.hs
|
||||
!src/CAStore/Program/IO.hs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue