4D Internet Commands v14

IT_Decode

Home

 
4D Internet Commands v14
IT_Decode

IT_Decode 


 

IT_Decode ( fileName ; decodedFile ; decodeMode ) -> Function result 
Parameter Type   Description
fileName  Text in LocalPath to an encoded file
decodedFile  Text in LocalPath file specification
in Path of decoded file
decodeMode  Integer in 1 = BinHex 2 = Base64 (Data fork only) 3 = AppleSingle 4 = AppleDouble 5 = AppleSingle AND Base64 6 = AppleDouble AND Base64 7 = UUEncode 8 = MacBinary
Function result  Integer in Error Code

The IT_Decode command decodes a file using the decodeMode specified. The specified file will not be altered and a decoded copy will be created.

fileName takes a full pathname specification to a file you want to decode. If an null string is passed in this parameter the user will be prompted with a dialog to select a file.

decodedFile can be passed:

  • a full LocalPath file specification providing a name and location for the decoded file.
  • a full LocalPath folder specification indicating the folder that will receive the decoded file using the original file name.
  • a null string (in this case, the IT_Decode command) will provide its own name for the document, located in the same folder as the file specified in the first parameter.
    Whether specified or not, the full path of the decoded document will be returned in this parameter.

decodeMode identifies which decoding method to apply to the file. The default value is 1 for binhex decoding. Other methods are:

CodeScheme
1BinHex
2Base64 (Data fork only)
3AppleSingle
4AppleDouble
5AppleSingle and Base64
6AppleDouble and Base64
7UUEncode
8MacBinary

When decoding using AppleDouble (decodeModes 4 & 6), this command looks for a file named "%filename" for the resource fork.

 
PROPERTIES 

Product: 4D Internet Commands
Theme: IC Utilities
Number: 88909

 
HISTORY 

Modified: 4D Internet Commands 6.8.1

 
SEE ALSO 

FTP_MacBinary
FTP_Receive
IT_Encode

 
ARTICLE USAGE

4D Internet Commands ( 4D Internet Commands v11.4)
4D Internet Commands ( 4D v13.2)
4D Internet Commands ( 4D Internet Commands v12.1)
4D Internet Commands ( 4D Internet Commands v14 R2)
4D Internet Commands ( 4D Internet Commands v14)
4D Internet Commands ( 4D Internet Commands v14 R3)
4D Internet Commands ( 4D Internet Commands v14 R4)