Data Transformation

CWTr_OpenVolumeV The Transform function is called from OpenCD, after the CD volume has been successfully opened. The attributes pertaining to the volume are valid in FileInfo.If the function does not return CWTr_OKV, the COPY is aborted, showing the Reason returned by the transform.
CWTr_StartOfFileV The transform function is called from MetaMorphProlog, after the Disk File Header has been received, but before any data has arrived. If the file cannot be processed, for example, because there are rows missing, this call will not happen.

The transform is provided with the disk file header. Many of the file attributes have already been extracted from the header and placed in FileInfo. Some attributes derived from the header are also available. Attributes can be extracted from the header using the MCP GetHeaderAttribute function, which is also used by COPYWRITE.

If the transform returns CWTR_SkipFileV, the file is discarded. Typically the FILEKIND is used to decide whether or not to skip a file. Transforming A-Series codefiles into ASCII text files is not a common requirement.

If the transform returns CWTr_OKV, the file is selected.

If the transform returns CWTr_SelectFileAndChangeTitleV, the file is selected, and COPYWRITE expects to find a standardform filename in Record, which is the title of the file as it will exist in the destination volume. For example, the Windows95 shortcut, appends a ".TXT" to each filename, to avoid duplicate file and directory names.

CWTr_DataRecordV This context is called from within MetaMorphWriteRecord. If the transform returns CWTR-OKV, the record is written to the volume, otherwise the record is skipped.
CWTr_EndOfFileV This is called from MetaMorphEpilog. If CWTr_OKV is not returned, the COPY process terminates.
CWTr_CloseVolumeV This context is called from within CloseCD, after all file systems have been written to the volume, and the volume has been locked on disk, and after the AUTOUNLOAD action has been completed.
CWTr_OpenFileSystemV This is called from OpenFileSystem which is not yet called anywhere. The intention is to provide the transform notification of the start and end of a file system , during creation of a hybrid CD volume archive.
CWTr_CloseFileSystemV This is called from CloseFileSystem, but not yet called.