This commit is contained in:
Dmitry Zuikov 2024-08-04 06:28:55 +03:00
parent 7e2cddc5f5
commit 9505cb3a76
1 changed files with 18 additions and 0 deletions

View File

@ -129,6 +129,24 @@ getFileTimestamp filePath = do
t0 <- liftIO $ getModificationTime filePath t0 <- liftIO $ getModificationTime filePath
pure (round $ utcTimeToPOSIXSeconds t0) pure (round $ utcTimeToPOSIXSeconds t0)
data EntryType = File | Dir
deriving stock (Eq,Ord,Show,Data,Generic)
data EntryDesc =
EntryDesc
{ entryType :: EntryType
, entryTimestamp :: Word64
}
deriving stock (Eq,Ord,Show,Data,Generic)
data DirEntry = DirEntry EntryDesc FilePath
deriving stock (Eq,Ord,Show,Data,Generic)
entriesFromLocalFile :: MonadUnliftIO m => FilePath -> FilePath -> m [DirEntry]
entriesFromLocalFile prefix fn = do
pure mempty
runDirectory :: ( IsContext c runDirectory :: ( IsContext c
, SyncAppPerks m , SyncAppPerks m
, Exception (BadFormException c) , Exception (BadFormException c)