Wiki
Download
Manual
Eggs
API
Tests
Bugs
show
edit
history
You can edit this page using
wiki syntax
for markup.
Article contents:
== snowtar This egg provides procedures for reading [[https://en.wikipedia.org/wiki/Tar_(computing)|tar]] files. It is capable of reading and writing files in the {{ustar}}, {{gnu}}, and {{v7}} tar formats. This is a port of the [[http://snow.iro.umontreal.ca/|Scheme Now!]] {{tar}} package. === Author Marc Feeley Ported to CHICKEN by felix winkelmann. === Requirements The [[miscmacros]] egg is required. === Record type Tar entries are represented by the {{tar-rec}} record type. ==== Accessors See the documentation of the various tar formats for further details on these fields. Some formats may not support all fields; if a given field is not supported, its accessor will return {{#f}}. <procedure>(tar-rec-name tar-rec) → string</procedure> Returns the full path of the entry. <procedure>(tar-rec-mode tar-rec) → integer</procedure> Returns the octal file mode of the entry. <procedure>(tar-rec-uid tar-rec) → integer</procedure> Returns the octal numeric user ID of the entry. <procedure>(tar-rec-gid tar-rec) → integer</procedure> Returns the octal numeric group ID of the entry. <procedure>(tar-rec-mtime tar-rec) → integer</procedure> Returns the (epoch) last modification time of the entry. <procedure>(tar-rec-type tar-rec) → integer</procedure> Returns the numeric type flag of the entry. <procedure>(tar-rec-linkname tar-rec) → string</procedure> Returns the linked path of the entry. <procedure>(tar-rec-uname tar-rec) → string</procedure> Returns the user name of the owner of the entry. <procedure>(tar-rec-gname tar-rec) → string</procedure> Returns the group name of the owner of the entry. <procedure>(tar-rec-devmajor tar-rec) → integer</procedure> Returns the major device number of the entry. <procedure>(tar-rec-devminor tar-rec) → integer</procedure> Returns the minor device number of the entry. <procedure>(tar-rec-atime tar-rec) → integer</procedure> Returns the (epoch) last access time of the entry. ({{gnu}} format archives only.) <procedure>(tar-rec-ctime tar-rec) → integer</procedure> Returns the (epoch) creation time of the entry. ({{gnu}} format archives only.) <procedure>(tar-rec-content tar-rec) → u8vector</procedure> Returns the file data of the entry. ==== Constructor <procedure>(make-tar-rec name mode uid gid mtime type linkname uname gname devmajor devminor atime ctime content) → tar-rec</procedure> Returns a new {{tar-rec}}. Fields may be omitted by passing {{#f}} for the corresponding argument. See the Accessor documentation above for the types of the arguments. === Procedures ==== Packing <procedure>(tar-pack-genport records port) → void</procedure> ''records'' must be a list of tar-rec objects. ''port'' must be an output port. Writes a tar archive containing the ''records'' to ''port''. Raises an exception (a tar condition object) if any of the ''records'' contain unsupported fields or invalid field contents. Currently, the data is in {{ustar}} format. <procedure>(tar-pack-file records path) → void</procedure> ''records'' must be a list of tar-rec objects. ''path'' must be a string describing a valid path. Writes a tar archive containing the ''records'' to the file named by ''path''. Raises an exception (a tar condition object) if any of the ''records'' contain unsupported fields or invalid field contents. Currently, the data is in {{ustar}} format. <procedure>(tar-pack-u8vector records) → u8vector</procedure> ''records'' must be a list of tar-rec objects. Encodes the ''records'' as a tar archive and returns this data as a u8vector. Raises an exception (a tar condition object) if any of the ''records'' contain unsupported fields or invalid field contents. Currently, the data is in {{ustar}} format. ==== Unpacking <procedure>(tar-unpack-genport port) → list[tar-rec]</procedure> Decodes tar data from ''port'' and returns it as a list of tar records. Raises an exception (a tar condition object) if decoding fails for some reason. <procedure>(tar-unpack-file path) → list[tar-rec]</procedure> Decodes tar data from the file named by ''path'' and returns it as a list of tar records. Raises an exception (a tar condition object) if decoding fails for some reason. <procedure>(tar-unpack-u8vector u8vector) → list[tar-rec]</procedure> Decodes tar data from ''u8vector'' and returns it as a list of tar records. Raises an exception (a tar condition object) if decoding fails for some reason. === Conditions <procedure>(make-tar-condition message) → condition</procedure> Returns a new tar condition object encapsulating the ''message'' argument (a string). This is a composite condition with the following structure: * Kind-key {{exn}} with prop-key {{message}}. * Kind-key {{snow}} with prop-keys {{type}} and {{data}}. * Kind-key {{tar-condition}}. See the [[/man/5/Module (chicken condition)|(chicken condition)]] module for more information on condition objects. <procedure>(tar-condition? obj) → boolean</procedure> Returns true iff ''obj'' is a tar condition object. <procedure>(tar-condition-msg condition) → string</procedure> Returns the message encapsulated by ''condition''. === Repository [[https://github.com/lassik/scheme-snowtar|GitHub]] === License LGPL 2.1 or later. === History ; 1.0.1.1 : fixed missing dependency (thanks to Mario) ; 1.0.1 : initial import
Description of your changes:
I would like to authenticate
Authentication
Username:
Password:
Spam control
What do you get when you multiply 4 by 6?