e-CryptIt Engine Xojo Plugin

AppleSingle.Encode Method (console safe)

To start to encode a file. If you inherit from the class then you can receive events from it, such as status event and event for in place encoding.

Encode(
   fIn as FolderItem,
   fOut as FolderItem,
   bSingle as Boolean,
   sCreator as String,
   sFileType as String) as Integer

Parameters

fIn
The file to encode.
fOut
Location and name of the encoded file.
Pass nil if you are using the OnWriteEncoded event.
bSingle
True for AppleSingle encoding, the most used one among the two.
False for AppleDouble encoding.
sCreator
The creator code of the destination file. Leave blank if fOut is nil.
sFileType
The file type code of the destination file. Leave blank if fOut is nil.

Returns

Integer

Remarks

Returns an error code, zero for no error.
-43 Invalid folderitem
-44 Internal error
-100 Decoding was aborted

WARNING
If you are using AppleDouble format, the data fork and the Mac specific items (resources fork) are stored in two different files, and you must take care of the data fork yourself.
To decode AppleDouble files, first decode the Mac specific file and then add the data fork file into the first decoded file.

See Also

AppleSingle Class