tar-0.6.0.0: Reading, writing and manipulating ".tar" archive files.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Codec.Archive.Tar.LongNames

Synopsis

Documentation

encodeLongNames :: GenEntry FilePath FilePath -> [Entry] Source #

Translate high-level entries with POSIX FilePaths for files and symlinks into entries suitable for serialization by emitting additional OtherEntryType 'K' and OtherEntryType 'L' nodes.

Input FilePaths must be POSIX file names, not native ones.

Since: 0.6.0.0

decodeLongNames :: Entries e -> GenEntries FilePath FilePath (Either e DecodeLongNamesError) Source #

Translate low-level entries (usually freshly deserialized) into high-level entries with POSIX FilePaths for files and symlinks by parsing and eliminating OtherEntryType 'K' and OtherEntryType 'L' nodes.

Resolved FilePaths are still POSIX file names, not native ones.

Since: 0.6.0.0

data DecodeLongNamesError Source #

Errors raised by decodeLongNames.

Since: 0.6.0.0

Constructors

TwoTypeKEntries

Two adjacent OtherEntryType 'K' nodes.

TwoTypeLEntries

Two adjacent OtherEntryType 'L' nodes.

NoLinkEntryAfterTypeKEntry

OtherEntryType 'K' node is not followed by a SymbolicLink / HardLink.