Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Provides PathData
for use with the FreeDesktopOrg backend.
Synopsis
- data PathData = UnsafePathData {}
- toPathData :: (HasCallStack, MonadCatch m, MonadLoggerNS m, MonadPathReader m) => Timestamp -> PathI TrashHome -> PathI TrashEntryOriginalPath -> m (PathData, PathTypeW)
- toCorePathData :: (HasCallStack, MonadAsync m, MonadCatch m, MonadLoggerNS m, MonadPathReader m, MonadPosixCompat m, MonadTerminal m) => PathI TrashHome -> PathData -> m PathData
- toCorePathDataDirectorySizes :: (HasCallStack, MonadAsync m, MonadCatch m, MonadLoggerNS m, MonadPathReader m, MonadPosixCompat m, MonadTerminal m) => HashMap ByteString DirectorySizesEntry -> PathI TrashHome -> PathData -> m PathData
- fromCorePathData :: PathData -> PathData
PathData
Data for an Fdo path. Maintains an invariant that the original path is not the root nor is it empty.
UnsafePathData | |
|
Instances
toPathData :: (HasCallStack, MonadCatch m, MonadLoggerNS m, MonadPathReader m) => Timestamp -> PathI TrashHome -> PathI TrashEntryOriginalPath -> m (PathData, PathTypeW) Source #
For a given filepath, attempts to capture the following data:
- Canonical path.
- Unique name to be used in the trash directory.
- File/directory type.
toCorePathData :: (HasCallStack, MonadAsync m, MonadCatch m, MonadLoggerNS m, MonadPathReader m, MonadPosixCompat m, MonadTerminal m) => PathI TrashHome -> PathData -> m PathData Source #
toCorePathDataDirectorySizes :: (HasCallStack, MonadAsync m, MonadCatch m, MonadLoggerNS m, MonadPathReader m, MonadPosixCompat m, MonadTerminal m) => HashMap ByteString DirectorySizesEntry -> PathI TrashHome -> PathData -> m PathData Source #
fromCorePathData :: PathData -> PathData Source #