xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

HB_UUEncodeFile()

UUEncodes a file.

Syntax

HB_UUEncodeFile( <cFilename>, <cUUEFile> ) --> NIL

Arguments

<cFilename>
This is a character string holding the name of the file to encode.
<cUUEFile>
This is a character string holding the name of the file where UUEncoded data is written to.

Return

The return value is always NIL.

Description

HB_UUEncodeFile() reads an entire file, UUEncodes it, and writes the encoded data into a second file.

Info

See also:HB_UUDecode(), HB_UUDecodeFile(), HB_UUEncode()
Category: Encoding/Decoding , xHarbour extensions
Source:tip\encoding\UUEncode.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example outlines UUEncoding and decoding of files.
// A PRG file is encoded in a second file which is decoded into
// a third file. The contents of the original and third file are
// identical.

   PROCEDURE Main
      LOCAL cFileIn  := "HB_UUEncode.prg"
      LOCAL cFileOut := "HB_UUEncode.prg.uue"

      HB_UUEncodeFile( cFileIn, cFileOut )

      HB_UUDecodeFile( cFileOut, "Test.txt" )

      ? Memoread( cFileIn ) == MemoRead( "Test.txt" ) // Result: .T.

   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe