newtar
newtar |
Purpose
Create a Unix tar archive from a list of files.
Synopsis
procedure newtar(opt:integer, tarfile:text, dir:text, lsf:list of text|string)
procedure newtar(tarfile:text, lsf:list of text|string)
Arguments
opt
|
Options:
|
||||||
tarfile
|
File name of the archive
|
||||||
dir
|
Base directory (default: current directory)
|
||||||
lsf
|
List of files and directories to store in the archive (file names are relative to the
dir directory)
|
Example
The following creates an archive of the Xpress installation including only binary files:
findfiles(SYS_RECURS,lsf,getenv("XPRESSDIR"),"bin/*;lib/*;dso/*") newtar(0,"xpress.tar",getenv("XPRESSDIR"),lsf)
Further information
1. This implementation processes only regular files, symbolic links (on Posix systems) and directories: other file types are silently ignored and not included in the archive.
2. By default file names are represented according the current system encoding in the archive. To select a different encoding use the
enc: file name prefix (see Section
Character encoding of text files) on the archive name (
e.g.
"enc:utf-8,myarc.tar").
3. File names including
".." are silently ignored unless option
SYS_FLAT is used.
Related topics
Module