pfile-0.1.0.1: CLI program for profiles management.
Copyright(c) 2024 Illia Shkroba
LicenseBSD3
MaintainerIllia Shkroba <[email protected]>
Stabilityunstable
Portabilitynon-portable (Non-Unix systems are not supported)
Safe HaskellSafe-Inferred
LanguageHaskell2010

PFile.Profile.LinkHandling

Description

Types and functions for handling links.

Synopsis

Documentation

handle :: (MonadError Error m, MonadIO m) => Strategy -> Absolute -> Absolute -> m () Source #

Handle links relocation with Strategy:

  • CopyFromOrigin - copy source link's target to destination.
  • CreateEmpty - create an empty directory at destination when source link's target is a directory or create an empty file at destination when source link's target is a file.
  • CopyLink - copy source link to destination.

Since: 0.1.0.0

data Error Source #

Error thrown by handle.

Since: 0.1.0.0

Constructors

CopyDirectoryFromOriginError !CopyError

Error was encountered during copyDirectory.

CopyFileFromOriginError !CopyFileError

Error was encountered during copyFile.

CreateEmptyDirectoryError !CreateDirectoryError

Error was encountered during createDirectory.

CreateEmptyFileError !WriteFileError

Error was encountered during createEmptyFile.

CopyLinkError !CopyLinkError

Error was encountered during copyLink.

data Strategy Source #

Link handling strategy for directory/file links to be used by handle.

Since: 0.1.0.0

Constructors

CopyFromOrigin

Copy source link's target to destination.

CreateEmpty

Create an empty directory at destination when source link's target is a directory or create an empty file at destination when source link's target is a file.

CopyLink

Copy source link to destination.