Initializing help system before first use

# 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:
SYS_NODIR | Do not store directories (only files)
SYS_DIRONLY | Store only directories
SYS_FLAT | Store all files in the root directory of the archive ( i.e. do not preserve directory structure)
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.
4. All files names are expected to be relative paths to the dir directory, absolute paths are silently ignored.
Related topics
tarlist, untar, newzip, getsysstat
Module
mmsystem
Parent Topic Procedures and functions

© 2001-2026 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.