haskus-system-0.6.0.0: Haskus system programming framework

Safe HaskellNone
LanguageHaskell2010

Haskus.Format.CPIO

Description

Module implementing the CPIO format (used by Linux initramfs)

FIXME: we use ByteStrings, but their size ("length") is only an Int, not a Word64.

Synopsis

Documentation

data FileDesc Source #

File description

  • fileDevMajor, fileDevMinor, fileDevInode: The device and inode numbers from the disk. These are used by programs that read cpio archives to determine when two entries refer to the same file. Programs that synthesize cpio archives should be careful to set these to distinct values for each entry.
  • fileRDevMajor, fileRDevMinor: For block special and character special entries, this field contains the associated device number. For all other entry types, it should be set to zero by writers and ignored by readers.
  • fileModifTime: Modification time of the file, indicated as the number of seconds since the start of the epoch, 00:00:00 UTC January 1, 1970.

Constructors

FileDesc 

Fields

Instances

Show FileDesc Source # 
Generic FileDesc Source # 

Associated Types

type Rep FileDesc :: * -> * #

Methods

from :: FileDesc -> Rep FileDesc x #

to :: Rep FileDesc x -> FileDesc #

Storable FileDesc Source # 
type Rep FileDesc Source # 

putFile :: FileDesc -> Text -> Buffer -> Put Source #

Put a file in the archive

  • path is the path in the archive

putFiles :: [(FileDesc, Text, Buffer)] -> Put Source #

Put files in archive (with archive ending marker)

getFile :: Get (FileDesc, Text, Buffer) Source #

Get a file from the archive

getFiles :: Get [(FileDesc, Text, Buffer)] Source #

Get all the files from the archive