@@ -121,7 +121,7 @@ type Permissions = FileMode
121
121
122
122
-- | Polymorphic tar archive entry. High-level interfaces
123
123
-- commonly work with 'GenEntry' 'FilePath' 'FilePath',
124
- -- while low-level ones use 'GenEntry' 'TarPath' 'LinkTarget'.
124
+ -- while low-level ones use 'GenEntry' t 'TarPath' t 'LinkTarget'.
125
125
--
126
126
-- @since 0.6.0.0
127
127
data GenEntry tarPath linkTarget = Entry {
@@ -161,7 +161,7 @@ entryPath = fromTarPath . entryTarPath
161
161
162
162
-- | Polymorphic content of a tar archive entry. High-level interfaces
163
163
-- commonly work with 'GenEntryContent' 'FilePath',
164
- -- while low-level ones use 'GenEntryContent' 'LinkTarget'.
164
+ -- while low-level ones use 'GenEntryContent' t 'LinkTarget'.
165
165
--
166
166
-- Portable archives should contain only 'NormalFile' and 'Directory'.
167
167
--
@@ -375,7 +375,7 @@ instance NFData TarPath where
375
375
instance Show TarPath where
376
376
show = show . fromTarPath
377
377
378
- -- | Convert a 'TarPath' to a native 'FilePath'.
378
+ -- | Convert a t 'TarPath' to a native 'FilePath'.
379
379
--
380
380
-- The native 'FilePath' will use the native directory separator but it is not
381
381
-- otherwise checked for validity or sanity. In particular:
@@ -391,23 +391,23 @@ instance Show TarPath where
391
391
fromTarPath :: TarPath -> FilePath
392
392
fromTarPath = fromPosixString . fromTarPathInternal (PS. unsafeFromChar FilePath.Native. pathSeparator)
393
393
394
- -- | Convert a 'TarPath' to a Unix\/Posix 'FilePath'.
394
+ -- | Convert a t 'TarPath' to a Unix\/Posix 'FilePath'.
395
395
--
396
396
-- The difference compared to 'fromTarPath' is that it always returns a Unix
397
397
-- style path irrespective of the current operating system.
398
398
--
399
- -- This is useful to check how a 'TarPath' would be interpreted on a specific
399
+ -- This is useful to check how a t 'TarPath' would be interpreted on a specific
400
400
-- operating system, eg to perform portability checks.
401
401
--
402
402
fromTarPathToPosixPath :: TarPath -> FilePath
403
403
fromTarPathToPosixPath = fromPosixString . fromTarPathInternal (PS. unsafeFromChar FilePath.Posix. pathSeparator)
404
404
405
- -- | Convert a 'TarPath' to a Windows 'FilePath'.
405
+ -- | Convert a t 'TarPath' to a Windows 'FilePath'.
406
406
--
407
407
-- The only difference compared to 'fromTarPath' is that it always returns a
408
408
-- Windows style path irrespective of the current operating system.
409
409
--
410
- -- This is useful to check how a 'TarPath' would be interpreted on a specific
410
+ -- This is useful to check how a t 'TarPath' would be interpreted on a specific
411
411
-- operating system, eg to perform portability checks.
412
412
--
413
413
fromTarPathToWindowsPath :: TarPath -> FilePath
@@ -425,11 +425,11 @@ fromTarPathInternal sep = go
425
425
| otherwise = adjustSeps prefix <> PS. cons sep (adjustSeps name)
426
426
{-# INLINE fromTarPathInternal #-}
427
427
428
- -- | Convert a native 'FilePath' to a 'TarPath'.
428
+ -- | Convert a native 'FilePath' to a t 'TarPath'.
429
429
--
430
430
-- The conversion may fail if the 'FilePath' is empty or too long.
431
431
toTarPath :: Bool -- ^ Is the path for a directory? This is needed because for
432
- -- directories a 'TarPath' must always use a trailing @\/@.
432
+ -- directories a t 'TarPath' must always use a trailing @\/@.
433
433
-> FilePath
434
434
-> Either String TarPath
435
435
toTarPath isDir path = case toTarPath' path' of
@@ -441,7 +441,7 @@ toTarPath isDir path = case toTarPath' path' of
441
441
then path <> [FilePath.Native. pathSeparator]
442
442
else path
443
443
444
- -- | Convert a native 'FilePath' to a 'TarPath'.
444
+ -- | Convert a native 'FilePath' to a t 'TarPath'.
445
445
-- Directory paths must always have a trailing @\/@, this is not checked.
446
446
--
447
447
-- @since 0.6.0.0
@@ -461,11 +461,11 @@ toTarPath'
461
461
-- @since 0.6.0.0
462
462
data ToTarPathResult
463
463
= FileNameEmpty
464
- -- ^ 'FilePath' was empty, but 'TarPath' must be non-empty.
464
+ -- ^ 'FilePath' was empty, but t 'TarPath' must be non-empty.
465
465
| FileNameOK TarPath
466
- -- ^ All good, this is just a normal 'TarPath'.
466
+ -- ^ All good, this is just a normal t 'TarPath'.
467
467
| FileNameTooLong TarPath
468
- -- ^ 'FilePath' was longer than 255 characters, 'TarPath' contains
468
+ -- ^ 'FilePath' was longer than 255 characters, t 'TarPath' contains
469
469
-- a truncated part only. An actual entry must be preceded by
470
470
-- 'longLinkEntry'.
471
471
@@ -515,7 +515,7 @@ newtype LinkTarget = LinkTarget PosixString
515
515
instance NFData LinkTarget where
516
516
rnf (LinkTarget bs) = rnf bs
517
517
518
- -- | Convert a native 'FilePath' to a tar 'LinkTarget'.
518
+ -- | Convert a native 'FilePath' to a tar t 'LinkTarget'.
519
519
-- string is longer than 100 characters or if it contains non-portable
520
520
-- characters.
521
521
toLinkTarget :: FilePath -> Maybe LinkTarget
@@ -534,7 +534,7 @@ instance Exception LinkTargetException where
534
534
displayException (TooLong _) = " The link target is too long"
535
535
536
536
-- | Convert a native 'FilePath' to a unix filepath suitable for
537
- -- using as 'LinkTarget'. Does not error if longer than 100 characters.
537
+ -- using as t 'LinkTarget'. Does not error if longer than 100 characters.
538
538
toLinkTarget' :: FilePath -> Maybe FilePath
539
539
toLinkTarget' path
540
540
| FilePath.Native. isAbsolute path = Nothing
@@ -544,15 +544,15 @@ toLinkTarget' path
544
544
= FilePath.Posix. addTrailingPathSeparator
545
545
| otherwise = id
546
546
547
- -- | Convert a tar 'LinkTarget' to a native 'FilePath'.
547
+ -- | Convert a tar t 'LinkTarget' to a native 'FilePath'.
548
548
fromLinkTarget :: LinkTarget -> FilePath
549
549
fromLinkTarget (LinkTarget pathbs) = fromFilePathToNative $ fromPosixString pathbs
550
550
551
- -- | Convert a tar 'LinkTarget' to a Unix\/POSIX 'FilePath' (@\'/\'@ path separators).
551
+ -- | Convert a tar t 'LinkTarget' to a Unix\/POSIX 'FilePath' (@\'/\'@ path separators).
552
552
fromLinkTargetToPosixPath :: LinkTarget -> FilePath
553
553
fromLinkTargetToPosixPath (LinkTarget pathbs) = fromPosixString pathbs
554
554
555
- -- | Convert a tar 'LinkTarget' to a Windows 'FilePath' (@\'\\\\\'@ path separators).
555
+ -- | Convert a tar t 'LinkTarget' to a Windows 'FilePath' (@\'\\\\\'@ path separators).
556
556
fromLinkTargetToWindowsPath :: LinkTarget -> FilePath
557
557
fromLinkTargetToWindowsPath (LinkTarget pathbs) =
558
558
fromFilePathToWindowsPath $ fromPosixString pathbs
@@ -581,7 +581,7 @@ fromFilePathInternal fromSep toSep = adjustSeps
581
581
-- | Polymorphic sequence of archive entries.
582
582
-- High-level interfaces
583
583
-- commonly work with 'GenEntries' 'FilePath' 'FilePath',
584
- -- while low-level ones use 'GenEntries' 'TarPath' 'LinkTarget'.
584
+ -- while low-level ones use 'GenEntries' t 'TarPath' t 'LinkTarget'.
585
585
--
586
586
-- The point of this type as opposed to just using a list is that it makes the
587
587
-- failure case explicit. We need this because the sequence of entries we get
@@ -647,7 +647,7 @@ unfoldEntriesM interleave f = unfold
647
647
Right (Just e) -> Next e <$> interleave unfold
648
648
649
649
-- | This is like the standard 'Data.List.foldr' function on lists, but for 'Entries'.
650
- -- Compared to 'foldr' it takes an extra function to account for the
650
+ -- Compared to 'Data.List. foldr' it takes an extra function to account for the
651
651
-- possibility of failure.
652
652
--
653
653
-- This is used to consume a sequence of entries. For example it could be used
0 commit comments