pfile-0.1.0.1: CLI program for profiles management.
Copyright(c) 2024 Illia Shkroba
LicenseBSD3
MaintainerIllia Shkroba <is@pjwstk.edu.pl>
Stabilityunstable
Portabilitynon-portable (Non-Unix systems are not supported)
Safe HaskellSafe-Inferred
LanguageHaskell2010

PFile.Profile.Internal.Registry

Description

Types and functions for managing profiles entries.

Synopsis

Documentation

pushAll :: (MonadReader Env m, MonadError PushError m, MonadWriter [Entry] m, MonadIO m) => Strategy -> Name -> [Absolute] -> m () Source #

push a list of Absolute inside of a Profile named Name with a chosen Strategy for links. When an error is encountered during push, pushAll terminates and provides successfully pushed entries via a MonadWriter.

Since: 0.1.0.0

push :: (MonadReader Env m, MonadError PushError m, MonadIO m) => Strategy -> Name -> Absolute -> m Mount Source #

mount a Absolute inside of a Profile named Name with a chosen Strategy for links.

Since: 0.1.0.0

newtype PushError Source #

Error thrown by push.

Since: 0.1.0.0

Constructors

PushError MountError

Error was encountered during mount.

pop :: (MonadReader Env m, MonadError PopError m, MonadIO m) => Name -> Mount -> m Absolute Source #

unmount a Mount from a Profile named Name back to its original location at Absolute.

Since: 0.1.0.0

newtype PopError Source #

Error thrown by pop.

Since: 0.1.0.0

Constructors

PopError UnmountError

Error was encountered during unmount.

linkAll :: (MonadError LinkError m, MonadWriter [Absolute] m, MonadIO m) => [Entry] -> m () Source #

link a list of Entryies. For each Entry a link at originPath will be created pointing at mountPath. When an error is encountered during link, linkAll terminates and provides successfully linked entries via a MonadWriter.

Since: 0.1.0.0

link :: (MonadError LinkError m, MonadIO m) => Mount -> Absolute -> m () Source #

Create a link at Absolute pointing at Mount.

Since: 0.1.0.0

newtype LinkError Source #

Error thrown by link.

Since: 0.1.0.0

Constructors

LinkError CreateLinkError

Unable to create a link at Absolute pointing at Mount.

unpackAll :: (MonadError UnpackError m, MonadWriter [Absolute] m, MonadIO m) => [Entry] -> m () Source #

unpack a list of Entryies. For each Entry a mountPath will be copied to originPath. When an error is encountered during unpack, unpackAll terminates and provides successfully unpacked entries via a MonadWriter.

Since: 0.1.0.0

unpack :: (MonadError UnpackError m, MonadIO m) => Mount -> Absolute -> m () Source #

Copy filesystem's object at Mount to Absolute.

Since: 0.1.0.0

data UnpackError Source #

Error thrown by unpack.

Since: 0.1.0.0

Constructors

UnpackError !Mount !Absolute !CopyError

Unable to copy Mount to Absolute.