[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
R_CPSize()
Determines the original size of a compressed file
------------------------------------------------------------------------------
Syntax
nFileSize := R_CPSize ( cCmpFile )
Arguments
cCmpFile File specification of a compressed file
Format : [drive:][\path\]filename[.ext]
Example : C:\INVOICE\INVOICE.#BF
Returns
nFileSize Original (uncompressed) size of the compressed file.
If an error is detected (p.e. the specified input
file doesn't exist) the value -1 will be returned.
The error can be examined using the R_LastErr ()
function.
Description
Determines what the file size of a file was before it was
compressed by R_Compress ().
This information can be used to check if there is enough free
disk space before decompressing files.
Example
*-- Compresses the file INVOICE.DBF => INVOICE.#BF and determines
*-- the original file size
*-- header file of RCmpLib
#include "RCmpLib.CH"
LOCAL nRetCode && Return code R_Compress
nRetCode := R_Compress ( 'INVOICE.DBF', 'INVOICE.#BF' )
IF nRetCode = CP_OKAY
*-- Compression okay : delete the original file
FErase ( 'INVOICE.DBF' )
?'The original size of INVOICE.#BF was : ', ;
R_CPSize ( 'INVOICE.#BF' )
ENDIF
See Also:
R_Compress()
R_CPName()
R_LastErr()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson