This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20
IT_Encode
|
IT_Encode ( fileName ; encodedFile ; encodedMode ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
fileName | Text |
![]() |
A LocalPath to a file | |||||
encodedFile | Text |
![]() |
LocalPath file specification | |||||
![]() |
Path to resulting encoded file | |||||||
encodedMode | Integer |
![]() |
Mac & Win: 1 = BinHex 2 = Base64 (Data fork only) 7 = UUEncode 8 = MacBinary; Mac only: 3 = AppleSingle 4 = AppleDouble 5 = AppleSingle AND Base64 6 = AppleDouble AND Base64 |
|||||
Function result | Integer |
![]() |
Error Code | |||||
The IT_Encode command encodes a file using the encodeMode specified. The specified file will not be altered and an encoded copy will be created. The name of the encoded file created will be the original file name plus a suffix appended to specify the encoding method. For Binhex encoding, the suffix ".hqx" will be appended. For Base64 encoding, the suffix ".b64" will be appended. For AppleSingle encoding, the suffix ".as" will be appended.
fileName takes a full pathname specification to a file you want to encode.
encodedFile can be passed:
encodeMode identifies which encoding method to apply to the file. The default value is 1 for binhex encoding. Other methods are:
Code | Scheme | Available on |
1 | BinHex | Win & Mac |
2 | Base64 (Data fork only) | Win & Mac |
3 | AppleSingle | Mac |
4 | AppleDouble | Mac |
5 | AppleSingle and Base64 | Mac |
6 | AppleDouble and Base64 | Mac |
7 | UUEncode | Win & Mac |
8 | MacBinary | Win & Mac |
When encoding using AppleDouble (encodeModes 4 & 6), two files are created named "%filename" and "filename".
Product: 4D
Theme: IC Utilities
Number:
88910
Modified: 4D Internet Commands 6.8.1
Modified: 4D Internet Commands v16 R2
4D Internet Commands ( 4D v20)