charon-0.1: Template
Safe HaskellSafe-Inferred
LanguageGHC2021

Charon.Backend.Cbor.PathData

Contents

Description

Provides PathData for use with the Cbor 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.Cbor.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.Cbor.PathData

Serial PathData Source # 
Instance details

Defined in Charon.Backend.Cbor.PathData

Associated Types

type DecodeExtra PathData Source #

NFData PathData Source # 
Instance details

Defined in Charon.Backend.Cbor.PathData

Methods

rnf :: PathData -> () #

Eq PathData Source # 
Instance details

Defined in Charon.Backend.Cbor.PathData

Hashable PathData Source # 
Instance details

Defined in Charon.Backend.Cbor.PathData

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

Defined in Charon.Backend.Cbor.PathData

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

Defined in Charon.Backend.Cbor.PathData

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

Defined in Charon.Backend.Cbor.PathData

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

Defined in Charon.Backend.Cbor.PathData

(k ~ A_Lens, a ~ Bytes 'B Natural, b ~ Bytes 'B Natural) => LabelOptic "size" k PathData PathData a b Source # 
Instance details

Defined in Charon.Backend.Cbor.PathData

type Rep PathData Source # 
Instance details

Defined in Charon.Backend.Cbor.PathData

type DecodeExtra PathData Source # 
Instance details

Defined in Charon.Backend.Cbor.PathData

toPathData :: (HasCallStack, MonadAsync m, MonadCatch m, MonadLoggerNS m, MonadPathReader m, MonadPosixCompat m, MonadTerminal 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.