Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Data.Conduit.Tar.Types
Description
Module contains all the types necessary for tarball processing.
Synopsis
- data Header = Header {
- headerOffset :: !FileOffset
- headerPayloadOffset :: !FileOffset
- headerFileNameSuffix :: !ShortByteString
- headerFileMode :: !CMode
- headerOwnerId :: !UserID
- headerGroupId :: !GroupID
- headerPayloadSize :: !FileOffset
- headerTime :: !EpochTime
- headerLinkIndicator :: !Word8
- headerLinkName :: !ShortByteString
- headerMagicVersion :: !ShortByteString
- headerOwnerName :: !ShortByteString
- headerGroupName :: !ShortByteString
- headerDeviceMajor :: !DeviceID
- headerDeviceMinor :: !DeviceID
- headerFileNamePrefix :: !ShortByteString
- data TarChunk
- = ChunkHeader Header
- | ChunkPayload !FileOffset !ByteString
- | ChunkException TarException
- data TarException
- data TarCreateException
- = FileNameTooLong !FileInfo
- | TarCreationError !String
- data FileType
- = FTNormal
- | FTHardLink !ByteString
- | FTSymbolicLink !ByteString
- | FTCharacterSpecial
- | FTBlockSpecial
- | FTDirectory
- | FTFifo
- | FTOther !Word8
- data FileInfo = FileInfo {
- filePath :: !ByteString
- fileUserId :: !UserID
- fileUserName :: !ByteString
- fileGroupId :: !GroupID
- fileGroupName :: !ByteString
- fileMode :: !FileMode
- fileSize :: !FileOffset
- fileType :: !FileType
- fileModTime :: !EpochTime
- type FileOffset = COff
- type ByteCount = CSize
- type UserID = CUid
- type GroupID = CGid
- type DeviceID = CDev
- type EpochTime = CTime
- newtype CUid = CUid Word32
- newtype CGid = CGid Word32
- encodeFilePath :: FilePath -> ByteString
- decodeFilePath :: ByteString -> FilePath
- getFileInfoPath :: FileInfo -> FilePath
Documentation
Constructors
Header | |
Fields
|
Constructors
ChunkHeader Header | |
ChunkPayload !FileOffset !ByteString | |
ChunkException TarException |
data TarException Source #
This the the exception type that is used in this module.
More constructors are susceptible to be added without bumping the major version of this module.
Constructors
Instances
Show TarException Source # | |
Defined in Data.Conduit.Tar.Types Methods showsPrec :: Int -> TarException -> ShowS show :: TarException -> String showList :: [TarException] -> ShowS | |
Exception TarException Source # | |
Defined in Data.Conduit.Tar.Types Methods toException :: TarException -> SomeException # fromException :: SomeException -> Maybe TarException # displayException :: TarException -> String # |
data TarCreateException Source #
Constructors
FileNameTooLong !FileInfo | |
TarCreationError !String |
Instances
Show TarCreateException Source # | |
Defined in Data.Conduit.Tar.Types Methods showsPrec :: Int -> TarCreateException -> ShowS show :: TarCreateException -> String showList :: [TarCreateException] -> ShowS | |
Exception TarCreateException Source # | |
Defined in Data.Conduit.Tar.Types Methods toException :: TarCreateException -> SomeException # fromException :: SomeException -> Maybe TarCreateException # displayException :: TarCreateException -> String # |
Constructors
FTNormal | |
FTHardLink !ByteString | |
FTSymbolicLink !ByteString | |
FTCharacterSpecial | |
FTBlockSpecial | |
FTDirectory | |
FTFifo | |
FTOther !Word8 |
Instances
Constructors
FileInfo | |
Fields
|
Instances
type FileOffset = COff #
Constructors
CUid Word32 |
Instances
Bounded CUid | |
Defined in System.Posix.Types | |
Enum CUid | |
Eq CUid | |
Integral CUid | |
Num CUid | |
Ord CUid | |
Read CUid | |
Defined in System.Posix.Types | |
Real CUid | |
Defined in System.Posix.Types Methods toRational :: CUid -> Rational | |
Show CUid | |
Bits CUid | |
Defined in System.Posix.Types Methods complement :: CUid -> CUid clearBit :: CUid -> Int -> CUid complementBit :: CUid -> Int -> CUid testBit :: CUid -> Int -> Bool bitSizeMaybe :: CUid -> Maybe Int unsafeShiftL :: CUid -> Int -> CUid unsafeShiftR :: CUid -> Int -> CUid rotateL :: CUid -> Int -> CUid | |
FiniteBits CUid | |
Defined in System.Posix.Types Methods finiteBitSize :: CUid -> Int countLeadingZeros :: CUid -> Int countTrailingZeros :: CUid -> Int | |
Storable CUid | |
Defined in System.Posix.Types Methods peekElemOff :: Ptr CUid -> Int -> IO CUid pokeElemOff :: Ptr CUid -> Int -> CUid -> IO () peekByteOff :: Ptr b -> Int -> IO CUid pokeByteOff :: Ptr b -> Int -> CUid -> IO () |
Constructors
CGid Word32 |
Instances
Bounded CGid | |
Defined in System.Posix.Types | |
Enum CGid | |
Eq CGid | |
Integral CGid | |
Num CGid | |
Ord CGid | |
Read CGid | |
Defined in System.Posix.Types | |
Real CGid | |
Defined in System.Posix.Types Methods toRational :: CGid -> Rational | |
Show CGid | |
Bits CGid | |
Defined in System.Posix.Types Methods complement :: CGid -> CGid clearBit :: CGid -> Int -> CGid complementBit :: CGid -> Int -> CGid testBit :: CGid -> Int -> Bool bitSizeMaybe :: CGid -> Maybe Int unsafeShiftL :: CGid -> Int -> CGid unsafeShiftR :: CGid -> Int -> CGid rotateL :: CGid -> Int -> CGid | |
FiniteBits CGid | |
Defined in System.Posix.Types Methods finiteBitSize :: CGid -> Int countLeadingZeros :: CGid -> Int countTrailingZeros :: CGid -> Int | |
Storable CGid | |
Defined in System.Posix.Types Methods peekElemOff :: Ptr CGid -> Int -> IO CGid pokeElemOff :: Ptr CGid -> Int -> CGid -> IO () peekByteOff :: Ptr b -> Int -> IO CGid pokeByteOff :: Ptr b -> Int -> CGid -> IO () |
encodeFilePath :: FilePath -> ByteString Source #
Convert FilePath
into a UTF-8 encoded ByteString
decodeFilePath :: ByteString -> FilePath Source #
Convert UTF-8 encoded ByteString
back into the FilePath
.
getFileInfoPath :: FileInfo -> FilePath Source #
Get the FilePath
.