CkZipEntry Ruby Programming Reference Documentation
CkZipEntry
Represents a single file or directory entry within a Chilkat Zip object.
Properties
# str is a CkString object (output) get_Comment( str )
# pStr is a string (input) put_Comment( pStr )
The comment stored within the Zip for this entry.
# Returns an integer value get_CompressedLength( )
The size of this file when Zip compression is applied
# Returns an integer value get_CompressionLevel( )
# newVal is an integer (input) put_CompressionLevel( newVal )
The compression level. 0 = no compression, while 9 = maximum compression. The default is 6.
# Returns an integer value get_CompressionMethod( )
# newVal is an integer (input) put_CompressionMethod( newVal )
Set to 0 for no compression, or 8 for the Deflate algorithm. The Deflate algorithm is the default algorithm of the most popular Zip utility programs, such as WinZip
# Returns an integer value get_EntryID( )
The unique ID assigned by Zip.NET while the object is instantiated in memory.
# Returns an integer value get_EntryType( )
Indicates the origin of the entry. There are three possible values: (0) a file on disk referenced by Zip.NET and to be added to the Zip, (1) an entry in an existing Zip file, and (2) an entry created directly from data in memory.
# sysTime is a SYSTEMTIME object (output) get_FileDateTime( sysTime )
# sysTime is a SYSTEMTIME object (input) put_FileDateTime( sysTime )
The last-modified time of the Zip entry.
# str is a CkString object (output) get_FileName( str )
# pStr is a string (input) put_FileName( pStr )
The file name of the Zip entry.
# Returns a boolean value get_IsDirectory( )
True if the Zip entry is a directory, false if it is a file.
# str is a CkString object (output) LastErrorHtml( str )
Error information in HTML format for the last method called.
# str is a CkString object (output) LastErrorText( str )
Error information in plain-text format for the last method called.
# str is a CkString object (output) LastErrorXml( str )
Error information in XML format for the last method called.
# Returns an integer value get_UncompressedLength( )
The size in bytes of the Zip entry when uncompressed.
# Returns a boolean value get_Utf8( )
# b is a boolean (input) put_Utf8( b )
When set to true, all "const char *" arguments are expected to be utf-8 strings. If set to false, the "const char *" arguments are expected to be ANSI strings.
Methods
# bdata is a CkByteData object (input) # Returns a boolean value AppendData( bdata )
Append text or binary data to a file within a Zip archive
# sdata is a CkString object (input) # Returns a boolean value AppendData( sdata )
Append text or binary data to a file within a Zip archive
# bdata is a CkByteData object (output) # Returns a boolean value Copy( bdata )
Returns the compressed data as a byte array.
# str is a CkString object (output) # Returns a boolean value CopyToBase64( str )
Returns the compressed data as a Base64-encoded string. This data can be re-added to a Zip by calling Zip.AppendBase64. Returns true for success, false for failure.
# str is a CkString object (output) # Returns a boolean value CopyToHex( str )
Returns the compressed data as a hexidecimal encoded string. This data can be re-added to a Zip by calling Zip.AppendHex. Returns true for success, false for failure.
# dirPath is a string (input) # Returns a boolean value Extract( dirPath )
Unzips this entry into the specified base directory. The file is unzipped to the subdirectory according to the relative path stored with the entry in the Zip. Use ExtractInto to unzip into a specific directory regardless of the path information stored in the Zip.
# dirPath is a string (input) # Returns a boolean value ExtractInto( dirPath )
Unzip a file into a specific directory
# bdata is a CkByteData object (output) # Returns a boolean value Inflate( bdata )
Inflate a file within a Zip directly into memory.
# addCR is a boolean (input) # str is a CkString object (output) # Returns a boolean value InflateToString( addCR, str )
Inflate and return the uncompressed data as a string. Line-endings are modified to include or not include carriage-returns based on KeepCR. If KeepCR = False, then bare linefeeds are returned, otherwise CRLFs are returned. Returns true for success, false for failure.
# str is a CkString object (output) # Returns a boolean value InflateToString2( str )
Unzip a file directly into memory as a string, and leave line-endings unmodified. Returns true for success, false for failure.
# Returns a CkZipEntry object NextEntry( )
Return the next entry (file or directory) within the Zip
# bdata is a CkByteData object (input) # Returns a boolean value ReplaceData( bdata )
Replace the contents of a file within a Zip archive
# sdata is a CkString object (input) # Returns a boolean value ReplaceData( sdata )
Replace the contents of a file within a Zip archive
# filename is a string (input) # Returns a boolean value SaveLastError( filename )
Saves the last error information to an XML formatted file.
# Returns a string comment( )
The comment stored within the Zip for this entry.
# Returns a string copyToBase64( )
Returns the compressed data as a Base64-encoded string. This data can be re-added to a Zip by calling Zip.AppendBase64.
# Returns a string copyToHex( )
Returns the compressed data as a hexidecimal encoded string. This data can be re-added to a Zip by calling Zip.AppendHex.
# Returns a string fileName( )
The file name of the Zip entry.
# addCR is a boolean (input) # Returns a string inflateToString( addCR )
Inflate and return the uncompressed data as a string. Line-endings are modified to include or not include carriage-returns based on KeepCR. If KeepCR = False, then bare linefeeds are returned, otherwise CRLFs are returned.
# Returns a string inflateToString2( )
Unzip a file directly into memory as a string, and leave line-endings unmodified.
# Returns a string lastErrorHtml( )
Error information in HTML format for the last method called.
# Returns a string lastErrorText( )
Error information in plain-text format for the last method called.
# Returns a string lastErrorXml( )
Error information in XML format for the last method called.
|