1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
|
-----------------------------------------------------------------------------
-- |
-- Module : Codec.Archive.Tar.Entry
-- Copyright : (c) 2007 Bjorn Bringert,
-- 2008 Andrea Vezzosi,
-- 2008-2009 Duncan Coutts
-- License : BSD3
--
-- Maintainer : duncan@community.haskell.org
-- Portability : portable
--
-- Types and functions to manipulate tar entries.
--
-- While the "Codec.Archive.Tar" module provides only the simple high level
-- API, this module provides full access to the details of tar entries. This
-- lets you inspect all the meta-data, construct entries and handle error cases
-- more precisely.
--
-- This module uses common names and so is designed to be imported qualified:
--
-- > import qualified Codec.Archive.Tar as Tar
-- > import qualified Codec.Archive.Tar.Entry as Tar
--
-----------------------------------------------------------------------------
{-# LANGUAGE CPP #-}
module Codec.Archive.Tar.Entry (
-- * Tar entry and associated types
GenEntry(..),
Entry,
entryPath,
GenEntryContent(..),
EntryContent,
Ownership(..),
FileSize,
Permissions,
EpochTime,
DevMajor,
DevMinor,
TypeCode,
Format(..),
-- * Constructing simple entry values
simpleEntry,
fileEntry,
directoryEntry,
longLinkEntry,
longSymLinkEntry,
-- * Standard file permissions
-- | For maximum portability when constructing archives use only these file
-- permissions.
ordinaryFilePermissions,
executableFilePermissions,
directoryPermissions,
-- * Constructing entries from disk files
packFileEntry,
packDirectoryEntry,
packSymlinkEntry,
#if __GLASGOW_HASKELL__ >= 908
{-# DEPRECATED "The re-export will be removed in future releases of tar, use directory-ospath-streaming package directly " #-}
#endif
getDirectoryContentsRecursive,
-- * TarPath type
TarPath,
toTarPath,
fromTarPath,
fromTarPathToPosixPath,
fromTarPathToWindowsPath,
-- * LinkTarget type
LinkTarget,
toLinkTarget,
fromLinkTarget,
fromLinkTargetToPosixPath,
fromLinkTargetToWindowsPath,
) where
import Codec.Archive.Tar.Types
import Codec.Archive.Tar.Pack
import System.Directory.OsPath.Streaming (getDirectoryContentsRecursive)
|