charon-0.1: Template
Safe HaskellSafe-Inferred
LanguageGHC2021

Charon.Backend.Fdo.PathData

Contents

Description

Provides PathData for use with the FreeDesktopOrg backend.

Synopsis

PathData

data PathData Source #

Data for an Fdo path. Maintains an invariant that the original path is not the root nor is it empty.

Constructors

UnsafePathData 

Fields

Instances

Instances details
Generic PathData Source # 
Instance details

Defined in Charon.Backend.Fdo.PathData

Associated Types

type Rep PathData :: Type -> Type #

Methods

from :: PathData -> Rep PathData x #

to :: Rep PathData x -> PathData #

Show PathData Source # 
Instance details

Defined in Charon.Backend.Fdo.PathData

Serial PathData Source # 
Instance details

Defined in Charon.Backend.Fdo.PathData

Associated Types

type DecodeExtra PathData Source #

NFData PathData Source # 
Instance details

Defined in Charon.Backend.Fdo.PathData

Methods

rnf :: PathData -> () #

Eq PathData Source # 
Instance details

Defined in Charon.Backend.Fdo.PathData

Hashable PathData Source # 
Instance details

Defined in Charon.Backend.Fdo.PathData

(k ~ A_Lens, a ~ Timestamp, b ~ Timestamp) => LabelOptic "created" k PathData PathData a b Source # 
Instance details

Defined in Charon.Backend.Fdo.PathData

(k ~ A_Lens, a ~ PathI 'TrashEntryFileName, b ~ PathI 'TrashEntryFileName) => LabelOptic "fileName" k PathData PathData a b Source # 
Instance details

Defined in Charon.Backend.Fdo.PathData

(k ~ A_Lens, a ~ PathI 'TrashEntryOriginalPath, b ~ PathI 'TrashEntryOriginalPath) => LabelOptic "originalPath" k PathData PathData a b Source # 
Instance details

Defined in Charon.Backend.Fdo.PathData

type Rep PathData Source # 
Instance details

Defined in Charon.Backend.Fdo.PathData

type Rep PathData = D1 ('MetaData "PathData" "Charon.Backend.Fdo.PathData" "charon-0.1-inplace" 'False) (C1 ('MetaCons "UnsafePathData" 'PrefixI 'True) (S1 ('MetaSel ('Just "fileName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (PathI 'TrashEntryFileName)) :*: (S1 ('MetaSel ('Just "originalPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (PathI 'TrashEntryOriginalPath)) :*: S1 ('MetaSel ('Just "created") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Timestamp))))
type DecodeExtra PathData Source # 
Instance details

Defined in Charon.Backend.Fdo.PathData

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.