RarEntry C Library Reference

RarEntry

Create/Dispose

HCkRarEntry CkRarEntry_Create(void);

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

void CkRarEntry_Dispose(HCkRarEntry handle);

Objects created by calling CkRarEntry_Create must be freed by calling this method. A memory leak occurs if a handle is not disposed by calling this function.

C "Properties"

unsigned long CkRarEntry_getCompressedSize(HCkRarEntry handle);

The compressed size in bytes of the file within the RAR archive. Directories have a compressed size of 0.

unsigned long CkRarEntry_getCrc(HCkRarEntry handle);

The CRC checksum.

void CkRarEntry_getFilename(HCkRarEntry handle, HCkString retval);

The filename, which can include a relative directory path.

BOOL CkRarEntry_getIsDirectory(HCkRarEntry handle);

true if the entry is a directory, false if it is a file.

BOOL CkRarEntry_getIsReadOnly(HCkRarEntry handle);

true if the file permissions are set to read-only after extraction. Otherwise set to false for read-write.

void CkRarEntry_getLastErrorHtml(HCkRarEntry handle, HCkString retval);

Error information in HTML format for the last method called.

void CkRarEntry_getLastErrorText(HCkRarEntry handle, HCkString retval);

Error information in plain-text format for the last method called.

void CkRarEntry_getLastErrorXml(HCkRarEntry handle, HCkString retval);

Error information in XML format for the last method called.

void CkRarEntry_getLastModified(HCkRarEntry handle, SYSTEMTIME *retval);

The last-modified date/time of the fille. When extracting, the file's last-mod date/time is set to this value.

unsigned long CkRarEntry_getUncompressedSize(HCkRarEntry handle);

The size (in bytes) of the file when uncompressed.

BOOL CkRarEntry_getUtf8(HCkRarEntry handle);
void CkRarEntry_putUtf8(HCkRarEntry handle, BOOL newVal);

To be documented soon...

C "Methods"

BOOL CkRarEntry_SaveLastError(HCkRarEntry handle, const char *filename);

Saves the last error information to an XML formatted file.

BOOL CkRarEntry_Unrar(HCkRarEntry handle, const char *dirPath);

Extracts the file to the dirPath specified.

const char *CkRarEntry_filename(HCkRarEntry handle);

The filename, which can include a relative directory path.

const char *CkRarEntry_lastErrorHtml(HCkRarEntry handle);

Error information in HTML format for the last method called.

const char *CkRarEntry_lastErrorText(HCkRarEntry handle);

Error information in plain-text format for the last method called.

const char *CkRarEntry_lastErrorXml(HCkRarEntry handle);

Error information in XML format for the last method called.