Tar C Reference Documentation

Tar

Current Version: 10.1.0

API for creating and extracting TAR archives. Also supports creating and extracting .tar.gz (.tgz), .tar.bz2, and .tar.Z (compressed TAR archives, also known as compressed tarball archives). Can read/write the following TAR formats: (1) GNU tar 1.13.x format, (2) PAX -- POSIX 1003.1-2001 format, (3) USTAR -- POSIX 1003.1-1988 format.

Create/Dispose

HCkTar instance = CkTar_Create();
// ...
CkTar_Dispose(instance);
HCkTar CkTar_Create(void);

Creates an instance of the HCkTar object and returns a handle ("void *" pointer). The handle is passed in the 1st argument for the functions listed on this page.

void CkTar_Dispose(HCkTar handle);

Objects created by calling CkTar_Create must be freed by calling this method. A memory leak occurs if a handle is not disposed by calling this function. Also, any handle returned by a Chilkat "C" function must also be freed by the application by calling the appropriate Dispose method, such as CkTar_Dispose.

Callback Functions

Callback Functions introduced in Chilkat v9.5.0.56
void CkTar_setAbortCheck(HCkTar cHandle, BOOL (*fnAbortCheck)(void));

Provides the opportunity for a method call to be aborted. If TRUE is returned, the operation in progress is aborted. Return FALSE to allow the current method call to continue. This callback function is called periodically based on the value of the HeartbeatMs property. (If HeartbeatMs is 0, then no callbacks are made.) As an example, to make 5 AbortCheck callbacks per second, set the HeartbeatMs property equal to 200.

void CkTar_setPercentDone(HCkTar cHandle, BOOL (*fnPercentDone)(int pctDone));

Provides the percentage completed for any method that involves network communications or time-consuming processing (assuming it is a method where a percentage completion can be measured). This callback is only called when it is possible to know a percentage completion, and when it makes sense to express the operation as a percentage completed. The pctDone argument will have a value from 1 to 100. For methods that complete very quickly, the number of PercentDone callbacks will vary, but the final callback should have a value of 100. For long running operations, no more than one callback per percentage point will occur (for example: 1, 2, 3, ... 98, 99, 100).

This callback counts as an AbortCheck callback, and takes the place of the AbortCheck event when it fires.

The return value indicates whether the method call should be aborted, or whether it should proceed. Return TRUE to abort, and FALSE to proceed.

void CkTar_setProgressInfo(HCkTar cHandle, void (*fnProgressInfo)(const char *name, const char *value));

This is a general callback that provides name/value information about what is happening at certain points during a method call. To see the information provided in ProgressInfo callbacks, if any, write code to handle this event and log the name/value pairs. Most are self-explanatory.

void CkTar_setTaskCompleted(HCkTar cHandle, void (*fnTaskCompleted)(HCkTask hTask));

Called in the background thread when an asynchronous task completes. (Note: When an async method is running, all callbacks are in the background thread.)

Properties

CaptureXmlListing
BOOL CkTar_getCaptureXmlListing(HCkTar cHandle);
void CkTar_putCaptureXmlListing(HCkTar cHandle, BOOL newVal);
Introduced in version 9.5.0.46

If TRUE, then untar methods, such as Untar, UntarGz, UntarBz2, and UntarZ, will also capture an XML listing of the contents in the XmlListing property. The format of the XML contained in XmlListing is identical to what is returned by the ListXml method. The default value is FALSE.

top
Charset
void CkTar_getCharset(HCkTar cHandle, HCkString retval);
void CkTar_putCharset(HCkTar cHandle, const char *newVal);
const char *CkTar_charset(HCkTar cHandle);

Character encoding to be used when interpreting filenames within .tar archives for untar operations. The default is "utf-8", and this is typically not changed. (The WriteTar methods always uses utf-8 to store filenames within the TAR archive.)

top
DebugLogFilePath
void CkTar_getDebugLogFilePath(HCkTar cHandle, HCkString retval);
void CkTar_putDebugLogFilePath(HCkTar cHandle, const char *newVal);
const char *CkTar_debugLogFilePath(HCkTar cHandle);

If set to a file path, causes each Chilkat method or property call to automatically append it's LastErrorText to the specified log file. The information is appended such that if a hang or crash occurs, it is possible to see the context in which the problem occurred, as well as a history of all Chilkat calls up to the point of the problem. The VerboseLogging property can be set to provide more detailed information.

This property is typically used for debugging the rare cases where a Chilkat method call hangs or generates an exception that halts program execution (i.e. crashes). A hang or crash should generally never happen. The typical causes of a hang are:

  1. a timeout related property was set to 0 to explicitly indicate that an infinite timeout is desired,
  2. the hang is actually a hang within an event callback (i.e. it is a hang within the application code), or
  3. there is an internal problem (bug) in the Chilkat code that causes the hang.

More Information and Examples
top
DirMode
int CkTar_getDirMode(HCkTar cHandle);
void CkTar_putDirMode(HCkTar cHandle, int newVal);

The directory permissions to used in WriteTar* methods. The default is octal 0755. This is the value to be stored in the "mode" field of each TAR header for a directory entries.

top
DirPrefix
void CkTar_getDirPrefix(HCkTar cHandle, HCkString retval);
void CkTar_putDirPrefix(HCkTar cHandle, const char *newVal);
const char *CkTar_dirPrefix(HCkTar cHandle);

A prefix to be added to each file's path within the TAR archive as it is being created. For example, if this property is set to the string "subdir1", then "subdir1/" will be prepended to each file's path within the TAR.

Note: This property does not apply to files added using the AddFile2 method, which directly specifies the path-in-tar.

top
FileMode
int CkTar_getFileMode(HCkTar cHandle);
void CkTar_putFileMode(HCkTar cHandle, int newVal);

The file permissions to used in WriteTar* methods. The default is octal 0644. This is the value to be stored in the "mode" field of each TAR header for a file entries.

top
GroupId
int CkTar_getGroupId(HCkTar cHandle);
void CkTar_putGroupId(HCkTar cHandle, int newVal);

The default numerical GID to be stored in each TAR header when writing TAR archives. The default value is 1000.

top
GroupName
void CkTar_getGroupName(HCkTar cHandle, HCkString retval);
void CkTar_putGroupName(HCkTar cHandle, const char *newVal);
const char *CkTar_groupName(HCkTar cHandle);

The default group name to be stored in each TAR header when writing TAR archives. The default value is the logged-on username of the application's process.

top
HeartbeatMs
int CkTar_getHeartbeatMs(HCkTar cHandle);
void CkTar_putHeartbeatMs(HCkTar cHandle, int newVal);

This is the number of milliseconds between each AbortCheck event callback. The AbortCheck callback allows an application to abort any TAR operation prior to completion. If HeartbeatMs is 0, no AbortCheck event callbacks will occur.

top
LastErrorHtml
void CkTar_getLastErrorHtml(HCkTar cHandle, HCkString retval);
const char *CkTar_lastErrorHtml(HCkTar cHandle);

Provides information in HTML format about the last method/property called. If a method call returns a value indicating failure, or behaves unexpectedly, examine this property to get more information.

top
LastErrorText
void CkTar_getLastErrorText(HCkTar cHandle, HCkString retval);
const char *CkTar_lastErrorText(HCkTar cHandle);

Provides information in plain-text format about the last method/property called. If a method call returns a value indicating failure, or behaves unexpectedly, examine this property to get more information.

top
LastErrorXml
void CkTar_getLastErrorXml(HCkTar cHandle, HCkString retval);
const char *CkTar_lastErrorXml(HCkTar cHandle);

Provides information in XML format about the last method/property called. If a method call returns a value indicating failure, or behaves unexpectedly, examine this property to get more information.

top
LastMethodSuccess
BOOL CkTar_getLastMethodSuccess(HCkTar cHandle);
void CkTar_putLastMethodSuccess(HCkTar cHandle, BOOL newVal);

Indicate whether the last method call succeeded or failed. A value of TRUE indicates success, a value of FALSE indicates failure. This property is automatically set for method calls. It is not modified by property accesses. The property is automatically set to indicate success for the following types of method calls:

  • Any method that returns a string.
  • Any method returning a Chilkat object, binary bytes, or a date/time.
  • Any method returning a standard boolean status value where success = TRUE and failure = FALSE.
  • Any method returning an integer where failure is defined by a return value less than zero.

Note: Methods that do not fit the above requirements will always set this property equal to TRUE. For example, a method that returns no value (such as a "void" in C++) will technically always succeed.

top
MatchCaseSensitive
BOOL CkTar_getMatchCaseSensitive(HCkTar cHandle);
void CkTar_putMatchCaseSensitive(HCkTar cHandle, BOOL newVal);
Introduced in version 9.5.0.46

Determines whether pattern matching for the MustMatch and MustNotMatch properties is case-sensitive or not. The default value is FALSE.

top
MustMatch
void CkTar_getMustMatch(HCkTar cHandle, HCkString retval);
void CkTar_putMustMatch(HCkTar cHandle, const char *newVal);
const char *CkTar_mustMatch(HCkTar cHandle);
Introduced in version 9.5.0.46

If set, then file paths must match this pattern when creating TAR archives, or when extracting from TAR archives. If a file does not match, it will not be included when creating a TAR, or it will not be extracted when extracting from a TAR. This property also applies to methods that create or extract from compressed TAR archives.

The must-match pattern may include 0 or more asterisk characters, each of which represents 0 or more of any character. For example, the pattern "*.txt" causes only .txt files to be included or extracted. The default value is an empty string, indicating that all files are implicitly matched.

top
MustNotMatch
void CkTar_getMustNotMatch(HCkTar cHandle, HCkString retval);
void CkTar_putMustNotMatch(HCkTar cHandle, const char *newVal);
const char *CkTar_mustNotMatch(HCkTar cHandle);
Introduced in version 9.5.0.46

If set, then file paths must NOT match this pattern when creating TAR archives, or when extracting from TAR archives. If a file path matches, it will not be included when creating a TAR, or it will not be extracted when extracting from a TAR. This property also applies to methods that create or extract from compressed TAR archives.

The must-not-match pattern may include 0 or more asterisk characters, each of which represents 0 or more of any character. For example, the pattern "*.obj" causes all .obj files to be skipped. The default value is an empty string, indicating that no files are skipped.

top
NoAbsolutePaths
BOOL CkTar_getNoAbsolutePaths(HCkTar cHandle);
void CkTar_putNoAbsolutePaths(HCkTar cHandle, BOOL newVal);

If TRUE, then absolute paths are converted to relative paths by removing the leading "/" or "\" character when untarring. This protects your system from unknowingly untarring files into important system directories, such as C:\Windows\system32. The default value is TRUE.

top
NumDirRoots
int CkTar_getNumDirRoots(HCkTar cHandle);

The total number of directory roots set by calling AddDirRoot (i.e. the number of times AddDirRoot was called by the application). A TAR archive is created by calling AddDirRoot for one or more directory tree roots, followed by a single call to WriteTar (or WriteTarBz2, WriteTarGz, WriteTarZ). This allows for TAR archives containing multiple directory trees to be created.

top
PercentDoneScale
int CkTar_getPercentDoneScale(HCkTar cHandle);
void CkTar_putPercentDoneScale(HCkTar cHandle, int newVal);
Introduced in version 9.5.0.49

This property is only valid in programming environment and languages that allow for event callbacks.

Sets the value to be defined as 100% complete for the purpose of PercentDone event callbacks. The defaut value of 100 means that at most 100 event PercentDone callbacks will occur in a method that (1) is event enabled and (2) is such that it is possible to measure progress as a percentage completed. This property may be set to larger numbers to get more fine-grained PercentDone callbacks. For example, setting this property equal to 1000 will provide callbacks with .1 percent granularity. For example, a value of 453 would indicate 45.3% competed. This property is clamped to a minimum value of 10, and a maximum value of 100000.

top
ScriptFileMode
int CkTar_getScriptFileMode(HCkTar cHandle);
void CkTar_putScriptFileMode(HCkTar cHandle, int newVal);

The file permissions to used in WriteTar* methods for shell script files (.sh, .csh, .bash, .bsh). The default is octal 0755. This is the value to be stored in the "mode" field of each TAR header for a file entries.

top
SuppressOutput
BOOL CkTar_getSuppressOutput(HCkTar cHandle);
void CkTar_putSuppressOutput(HCkTar cHandle, BOOL newVal);
Introduced in version 9.5.0.46

If TRUE, then untar methods, such as Untar, UntarGz, UntarBz2, and UntarZ, do not produce any output. Setting this value equal to TRUE is useful when the CaptureXmlListing is also set to TRUE, which enables an application to get the contents of a TAR archive without extracting. The default value is FALSE.

top
UntarCaseSensitive
BOOL CkTar_getUntarCaseSensitive(HCkTar cHandle);
void CkTar_putUntarCaseSensitive(HCkTar cHandle, BOOL newVal);

This property is deprecated. Applications should instead use the MatchCaseSensitive property. Until this property is officially removed, it will behave the same as the MatchCaseSensitive property.

top
UntarDebugLog
BOOL CkTar_getUntarDebugLog(HCkTar cHandle);
void CkTar_putUntarDebugLog(HCkTar cHandle, BOOL newVal);

Similar to the VerboseLogging property. If set to TRUE, then information about each file/directory extracted in an untar method call is logged to LastErrorText (or LastErrorXml / LastErrorHtml). The default value is FALSE.

top
UntarDiscardPaths
BOOL CkTar_getUntarDiscardPaths(HCkTar cHandle);
void CkTar_putUntarDiscardPaths(HCkTar cHandle, BOOL newVal);

If TRUE, then discard all path information when untarring. This causes all files to be untarred into a single directory. The default value is FALSE.

top
UntarFromDir
void CkTar_getUntarFromDir(HCkTar cHandle, HCkString retval);
void CkTar_putUntarFromDir(HCkTar cHandle, const char *newVal);
const char *CkTar_untarFromDir(HCkTar cHandle);

The directory path where files are extracted when untarring. The default value is ".", meaning that the current working directory of the calling process is used. If UntarDiscardPaths is set, then all files are untarred into this directory. Otherwise, the untar operation will re-create a directory tree rooted in this directory.

top
UntarMaxCount
int CkTar_getUntarMaxCount(HCkTar cHandle);
void CkTar_putUntarMaxCount(HCkTar cHandle, int newVal);

Limits the number of files extracted during an untar to this count. The default value is 0 to indicate no maximum. To untar a single file, one might set the UntarMatchPattern such that it will match only the file to be extracted, and also set UntarMaxCount equal to 1. This causes an untar to scan the TAR archive until it finds the matching file, extract it, and then return.

top
UserId
int CkTar_getUserId(HCkTar cHandle);
void CkTar_putUserId(HCkTar cHandle, int newVal);

The default numerical UID to be stored in each TAR header when writing TAR archives. The default value is 1000.

top
UserName
void CkTar_getUserName(HCkTar cHandle, HCkString retval);
void CkTar_putUserName(HCkTar cHandle, const char *newVal);
const char *CkTar_userName(HCkTar cHandle);

The default user name to be stored in each TAR header when writing TAR archives. The default value is the logged-on username of the application's process.

top
Utf8
BOOL CkTar_getUtf8(HCkTar cHandle);
void CkTar_putUtf8(HCkTar cHandle, BOOL newVal);

When set to TRUE, all "const char *" arguments are interpreted as utf-8 strings. If set to FALSE (the default), then "const char *" arguments are interpreted as ANSI strings. Also, when set to TRUE, and Chilkat method returning a "const char *" is returning the utf-8 representation. If set to FALSE, all "const char *" return values are ANSI strings.

top
VerboseLogging
BOOL CkTar_getVerboseLogging(HCkTar cHandle);
void CkTar_putVerboseLogging(HCkTar cHandle, BOOL newVal);

If set to TRUE, then the contents of LastErrorText (or LastErrorXml, or LastErrorHtml) may contain more verbose information. The default value is FALSE. Verbose logging should only be used for debugging. The potentially large quantity of logged information may adversely affect peformance.

top
Version
void CkTar_getVersion(HCkTar cHandle, HCkString retval);
const char *CkTar_version(HCkTar cHandle);

Version of the component/library, such as "9.5.0.94"

More Information and Examples
top
WriteFormat
void CkTar_getWriteFormat(HCkTar cHandle, HCkString retval);
void CkTar_putWriteFormat(HCkTar cHandle, const char *newVal);
const char *CkTar_writeFormat(HCkTar cHandle);

The TAR format to use when writing a TAR archive. Valid values are "gnu", "pax", and "ustar". The default value is "gnu".

top
XmlListing
void CkTar_getXmlListing(HCkTar cHandle, HCkString retval);
void CkTar_putXmlListing(HCkTar cHandle, const char *newVal);
const char *CkTar_xmlListing(HCkTar cHandle);
Introduced in version 9.5.0.46

Contains the XML listing of the contents of the TAR archive for the last untar method call (such as Untar, UntarGz, etc.) where the CaptureXmlListing property was set to TRUE.

top

Methods

AddDirRoot
BOOL CkTar_AddDirRoot(HCkTar cHandle, const char *dirPath);

Adds a directory tree to be included in the next call to one of the WriteTar* methods. To include multiple directory trees in a .tar, call AddDirRoot multiple times followed by a single call to WriteTar.

Returns TRUE for success, FALSE for failure.

top
AddDirRoot2
BOOL CkTar_AddDirRoot2(HCkTar cHandle, const char *rootPrefix, const char *rootPath);
Introduced in version 9.5.0.56

Adds a directory tree to be included in the next call to one of the WriteTar* methods. To include multiple directory trees in a .tar, call AddDirRoot2 (and/or AddDirRoot) multiple times followed by a single call to WriteTar.

The rootPrefix adds a prefix to the path in the TAR for all files added under this root. The rootPrefix should not end with a forward-slash char. For example: This is good: "abc/123", but this is not good: "abc/123/". If the DirPrefix property is also set, its prefix will added first.

Returns TRUE for success, FALSE for failure.

top
AddFile
BOOL CkTar_AddFile(HCkTar cHandle, const char *path);
Introduced in version 9.5.0.46

Adds a local file to be included in the next call to one of the WriteTar* methods. To include multiple files or directory trees in a .tar, call AddFile/AddDirRoot multiple times followed by a single call to WriteTar (or WriteTarGz, or WriteTarBz2).

Returns TRUE for success, FALSE for failure.

top
AddFile2
BOOL CkTar_AddFile2(HCkTar cHandle, const char *filePath, const char *pathWithinTar);
Introduced in version 9.5.0.69

Adds a local file to be included in the next call to one of the WriteTar* methods. Allows for the path within the TAR to be specified. To include multiple files or directory trees in a .tar, call AddFile/AddFile2/AddDirRoot multiple times followed by a single call to WriteTar (or WriteTarGz, or WriteTarBz2).

Note: The DirPrefix property does not apply to files added via this method because this method explicilty specifies the path-in-tar.

Returns TRUE for success, FALSE for failure.

top
ClearDirRootsAndFiles
BOOL CkTar_ClearDirRootsAndFiles(HCkTar cHandle);
Introduced in version 9.5.0.84

Clears all directory roots and files previously added by calls to AddDirRoot, AddDirRoot2, AddFile, and AddFile2.

Returns TRUE for success, FALSE for failure.

top
CreateDeb
BOOL CkTar_CreateDeb(HCkTar cHandle, const char *controlPath, const char *dataPath, const char *debPath);
Introduced in version 9.5.0.66

Creates a .deb Debian binary package archive from a control.tar.gz and data.tar.gz. The controlPath is the path to the control.tar.gz file (or equivalent), and the dataPath is the path to the data.tar.gz file. The output file path (.deb) is specified in debPath.

Returns TRUE for success, FALSE for failure.

top
GetDirRoot
BOOL CkTar_GetDirRoot(HCkTar cHandle, int index, HCkString outStr);
const char *CkTar_getDirRoot(HCkTar cHandle, int index);

Returns the value of the Nth directory root. For example, if an application calls AddDirRoot twice, then the NumDirRoots property would have a value of 2, and GetDirRoot(0) would return the path passed to AddDirRoot in the 1st call, and GetDirRoot(1) would return the directory path in the 2nd call to AddDirRoot.

Returns TRUE for success, FALSE for failure.

top
ListXml
BOOL CkTar_ListXml(HCkTar cHandle, const char *tarPath, HCkString outStr);
const char *CkTar_listXml(HCkTar cHandle, const char *tarPath);

Scans a TAR archive and returns XML detailing the files and directories found within the TAR.

Returns TRUE for success, FALSE for failure.

top
ListXmlAsync (1)
HCkTask CkTar_ListXmlAsync(HCkTar cHandle, const char *tarPath);

Creates an asynchronous task to call the ListXml method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Returns NULL on failure

top
LoadTaskCaller
BOOL CkTar_LoadTaskCaller(HCkTar cHandle, HCkTask task);
Introduced in version 9.5.0.80

Loads the caller of the task's async method.

Returns TRUE for success, FALSE for failure.

top
Untar
int CkTar_Untar(HCkTar cHandle, const char *tarPath);

Extracts the files and directories from a TAR archive, reconstructing the directory tree(s) in the local filesystem. The files are extracted to the directory specified by the UntarFromDir property. Returns the number of files and directories extracted, or -1 for failure.

More Information and Examples
top
UntarAsync (1)
HCkTask CkTar_UntarAsync(HCkTar cHandle, const char *tarPath);

Creates an asynchronous task to call the Untar method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Returns NULL on failure

top
UntarBz2
BOOL CkTar_UntarBz2(HCkTar cHandle, const char *tarPath);

Extracts the files and directories from a tar.bz2 (or tar.bzip2) archive, reconstructing the directory tree(s) in the local filesystem. The files are extracted to the directory specified by the UntarFromDir property.

Returns TRUE for success, FALSE for failure.

More Information and Examples
top
UntarBz2Async (1)
HCkTask CkTar_UntarBz2Async(HCkTar cHandle, const char *tarPath);

Creates an asynchronous task to call the UntarBz2 method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Returns NULL on failure

top
UntarFirstMatchingToBd
BOOL CkTar_UntarFirstMatchingToBd(HCkTar cHandle, const char *tarPath, const char *matchPattern, HCkBinData bd);
Introduced in version 9.5.0.82

Untars the first file matching the matchPattern into bd.

Returns TRUE for success, FALSE for failure.

top
UntarFirstMatchingToMemory
BOOL CkTar_UntarFirstMatchingToMemory(HCkTar cHandle, HCkByteData tarFileBytes, const char *matchPattern, HCkByteData outBytes);

Memory-to-memory untar. The first file matching the matchPattern is extracted and returned.

Returns TRUE for success, FALSE for failure.

top
UntarFromMemory
int CkTar_UntarFromMemory(HCkTar cHandle, HCkByteData tarFileBytes);

Extracts the files and directories from an in-memory TAR archive, reconstructing the directory tree(s) in the local filesystem. The files are extracted to the directory specified by the UntarFromDir property. Returns the number of files and directories extracted, or -1 for failure.

top
UntarFromMemoryAsync (1)
HCkTask CkTar_UntarFromMemoryAsync(HCkTar cHandle, HCkByteData tarFileBytes);

Creates an asynchronous task to call the UntarFromMemory method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Returns NULL on failure

top
UntarGz
BOOL CkTar_UntarGz(HCkTar cHandle, const char *tarPath);

Extracts the files and directories from a tar.gz (or tar.gzip) archive, reconstructing the directory tree(s) in the local filesystem. The files are extracted to the directory specified by the UntarFromDir property.

Returns TRUE for success, FALSE for failure.

More Information and Examples
top
UntarGzAsync (1)
HCkTask CkTar_UntarGzAsync(HCkTar cHandle, const char *tarPath);

Creates an asynchronous task to call the UntarGz method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Returns NULL on failure

top
UntarZ
BOOL CkTar_UntarZ(HCkTar cHandle, const char *tarPath);

Extracts the files and directories from a tar.Z archive, reconstructing the directory tree(s) in the local filesystem. The files are extracted to the directory specified by the UntarFromDir property.

Returns TRUE for success, FALSE for failure.

More Information and Examples
top
UntarZAsync (1)
HCkTask CkTar_UntarZAsync(HCkTar cHandle, const char *tarPath);

Creates an asynchronous task to call the UntarZ method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Returns NULL on failure

top
VerifyTar
BOOL CkTar_VerifyTar(HCkTar cHandle, const char *tarPath);

Verifies that a TAR archive is valid. This method opens the TAR archive and scans the entire file by walking the TAR headers. Returns TRUE if no errors were found. Otherwise returns FALSE.

top
VerifyTarAsync (1)
HCkTask CkTar_VerifyTarAsync(HCkTar cHandle, const char *tarPath);

Creates an asynchronous task to call the VerifyTar method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Returns NULL on failure

top
WriteTar
BOOL CkTar_WriteTar(HCkTar cHandle, const char *tarPath);

Writes a TAR archive. The directory trees previously added by calling AddDirRoot one or more times are included in the output TAR archive.

Returns TRUE for success, FALSE for failure.

More Information and Examples
top
WriteTarAsync (1)
HCkTask CkTar_WriteTarAsync(HCkTar cHandle, const char *tarPath);

Creates an asynchronous task to call the WriteTar method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Returns NULL on failure

top
WriteTarBz2
BOOL CkTar_WriteTarBz2(HCkTar cHandle, const char *bz2Path);

Writes a .tar.bz2 compressed TAR archive. The directory trees previously added by calling AddDirRoot one or more times are included in the output file.

Returns TRUE for success, FALSE for failure.

top
WriteTarBz2Async (1)
HCkTask CkTar_WriteTarBz2Async(HCkTar cHandle, const char *bz2Path);

Creates an asynchronous task to call the WriteTarBz2 method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Returns NULL on failure

top
WriteTarGz
BOOL CkTar_WriteTarGz(HCkTar cHandle, const char *gzPath);

Writes a .tar.gz (also known as .tgz) compressed TAR archive. The directory trees previously added by calling AddDirRoot one or more times are included in the output file.

Returns TRUE for success, FALSE for failure.

More Information and Examples
top
WriteTarGzAsync (1)
HCkTask CkTar_WriteTarGzAsync(HCkTar cHandle, const char *gzPath);

Creates an asynchronous task to call the WriteTarGz method with the arguments provided. (Async methods are available starting in Chilkat v9.5.0.52.)

Returns NULL on failure

top