This is tar.egg.info, produced by makeinfo version 4.7 from
eggdoc-output.texi.

INFO-DIR-SECTION The Algorithmic Language Scheme
START-INFO-DIR-ENTRY
* tar.egg: (tar.egg).		Reading and writing tar files.
END-INFO-DIR-ENTRY


File: tar.egg.info,  Node: Top,  Next: About this egg,  Up: (dir)

tar egg
*******

Reading and writing tar files.

Written by felix (mailto:felix@call-with-current-continuation.org)

   This manual corresponds to version 1.3 of the tar extension library
for Chicken Scheme.

* Menu:

* About this egg::
* Documentation::
* Reading::
* Writing::
* Accessing header records::
* License::
* Index::


File: tar.egg.info,  Node: About this egg,  Next: Documentation,  Prev: Top,  Up: Top

1 About this egg
****************

* Menu:

* Version history::
* Usage::


File: tar.egg.info,  Node: Version history,  Next: Usage,  Up: About this egg

1.1 Version history
===================

`1.3'
     space-terminated fields resulted in invalid string->number
     conversion; termination records

`1.2'
     Fixed some serious bugs

`1.1'
     Proper end-of-file handling

`1.0'
     Initial release


File: tar.egg.info,  Node: Usage,  Prev: Version history,  Up: About this egg

1.2 Usage
=========

Load this egg like so:

   `(require-extension tar)'


File: tar.egg.info,  Node: Documentation,  Next: Reading,  Prev: About this egg,  Up: Top

2 Documentation
***************

This extension allows extracting files from tar archives and writing
files into them.


File: tar.egg.info,  Node: Reading,  Next: Writing,  Prev: Documentation,  Up: Top

3 Reading
*********

 -- procedure: tar:open-archived-file
          (tar:open-archived-file [PORT])

     Reads the next header-record from `PORT' (which defaults to the
     value of `(current-input-port)') and returns two values: an
     input-port representing the contents of the next file in the
     archive and a tar-header record. If no more files are stored in
     the archive, then `#!eof' and `#f' is returned.


File: tar.egg.info,  Node: Writing,  Next: Accessing header records,  Prev: Reading,  Up: Top

4 Writing
*********

 -- procedure: tar:write-to-archive
          (tar:write-to-archive FILENAME STRING [PORT #!key mode uid gid modification-time type-flag link-name uname gname devmajor devminor])

     Writes the data given in `STRING' as `FILENAME' to the archive
     designated by the output port `PORT' (which defaults to the value
     of `(current-output-port)').

     The keyword arguments specify additional information in the
     header-record for this file, see the table below for the default
     used when no arguments are given:

     `mode'               `(bitwise-ior        Permissions
                          perm/irusr           
                          perm/iwusr           
                          perm/irgrp           
                          perm/gwgrp           
                          perm/iwoth           
                          perm/iwoth)'         
     `uid'                `(current-user-id)'  Numeric user-id of
                                               the file owner
     `gid'                `(current-group-id)' Numeric group-id of
                                               the file owners
     `modification-time'  `(current-seconds)'  Modification-time
                                               of the file when it
                                               was archived as the
                                               number of seconds
                                               from Jan.1, 1970 UTC
     `type-flag'          `'normal'            One of symbols
                                               `normal, oldnormal,
                                               link, symlink, chr,
                                               blk, dir, fifo,
                                               contig'
     `link-name'          `""'                 Name of a hard or
                                               symbolic link
     `uname'              `(car                Username of the
                          (user-information    file owner
                          uid))'               
     `gname'              `(car                Groupname of the
                          (group-information   file owners
                          gid))'               
     `devmajor'           `0'                  Major device number
                                               of device-files of
                                               type `blk' or `chr'
     `devminor'           `0'                  Minor device number
                                               of device-files of
                                               type `blk' or `chr'

     After the last file, a termination record should be written to the
     port that represents the archive (invoke `tar:write-to-archive'
     with `#f' as the `FILENAME' argument).


File: tar.egg.info,  Node: Accessing header records,  Next: License,  Prev: Writing,  Up: Top

5 Accessing header records
**************************

 -- procedure: tar:header?
          (tar:header? X)

     Returns `#t' when `X' is a header-record or `#f' otherwise.

 -- procedure: tar:header-name
          (tar:header-name HEADER)


 -- procedure: tar:header-mode
          (tar:header-mode HEADER)


 -- procedure: tar:header-size
          (tar:header-size HEADER)


 -- procedure: tar:header-uid
          (tar:header-uid HEADER)


 -- procedure: tar:header-gid
          (tar:header-gid HEADER)


 -- procedure: tar:header-modification-time
          (tar:header-modification-time HEADER)


 -- procedure: tar:header-checksum
          (tar:header-checksum HEADER)


 -- procedure: tar:header-type-flag
          (tar:header-type-flag HEADER)


 -- procedure: tar:header-link-name
          (tar:header-link-name HEADER)


 -- procedure: tar:header-magic
          (tar:header-magic HEADER)


 -- procedure: tar:header-uname
          (tar:header-uname HEADER)


 -- procedure: tar:header-gname
          (tar:header-gname HEADER)


 -- procedure: tar:header-devmajor
          (tar:header-devmajor HEADER)


 -- procedure: tar:header-devminor
          (tar:header-devminor HEADER)

     Accessors for various fields of a tar header record.


File: tar.egg.info,  Node: License,  Next: Index,  Prev: Accessing header records,  Up: Top

6 License
*********


Copyright (c) 2006, Felix Winkelmann.  All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the Software),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.


File: tar.egg.info,  Node: Index,  Prev: License,  Up: Top

Index
*****

 [index ]
* Menu:

* tar:header-checksum:                   Accessing header records.
                                                               (line 36)
* tar:header-devmajor:                   Accessing header records.
                                                               (line 60)
* tar:header-devminor:                   Accessing header records.
                                                               (line 64)
* tar:header-gid:                        Accessing header records.
                                                               (line 28)
* tar:header-gname:                      Accessing header records.
                                                               (line 56)
* tar:header-link-name:                  Accessing header records.
                                                               (line 44)
* tar:header-magic:                      Accessing header records.
                                                               (line 48)
* tar:header-mode:                       Accessing header records.
                                                               (line 16)
* tar:header-modification-time:          Accessing header records.
                                                               (line 32)
* tar:header-name:                       Accessing header records.
                                                               (line 12)
* tar:header-size:                       Accessing header records.
                                                               (line 20)
* tar:header-type-flag:                  Accessing header records.
                                                               (line 40)
* tar:header-uid:                        Accessing header records.
                                                               (line 24)
* tar:header-uname:                      Accessing header records.
                                                               (line 52)
* tar:header?:                           Accessing header records.
                                                               (line  7)
* tar:open-archived-file:                Reading.              (line  7)
* tar:write-to-archive:                  Writing.              (line  7)



Tag Table:
Node: Top225
Node: About this egg625
Node: Version history789
Node: Usage1123
Node: Documentation1279
Node: Reading1492
Node: Writing2003
Node: Accessing header records4954
Node: License6308
Node: Index7505

End Tag Table
