Name
hw_ChunkToFile -- save virtual file to real file (V6.0)
Synopsis
int error = hw_ChunkToFile(STRPTR dest, APTR src, DOSINT64 pos,
                DOSINT64 len, ULONG flags, struct hwTagList *tags);
Function
This function can be used to save a virtual file to a physical file. This is useful in connection with the hw_TranslateFileName() and hw_TranslateFileNameExt() commands which break down a virtual file specification into their individual constituents. hw_ChunkToFile() uses these individual constituents to save the virtual file to the new physical file specified in dest.

If the HWCTFFLAGS_MEMORYSOURCE flag isn't set, you have to pass a STRPTR to the filename that contains the virtual file in src. The pos and len parameters must be set to the respective values returned by hw_TranslateFileName() or hw_TranslateFileNameExt(). If HWCTFFLAGS_MEMORYSOURCE is set, you have to pass a pointer to a memory block in src. The pos argument is ignored in this case but the len argument must contain the virtual file length in bytes. Once again, this value is returned by hw_TranslateFileName() and hw_TranslateFileNameExt(). See hw_TranslateFileNameExt for details.

Designer compatibility
Unsupported

Inputs
dest
name of physical file to save virtual file to
src
pointer to a filename or memory block depending on whether HWCTFFLAGS_MEMORYSOURCE is set (see above)
pos
virtual file offset inside the container file
len
virtual file length inside the container file
flags
flags for the operation (see above)
tags
currently unused, pass NULL
Results
error
error code or 0 on success

Show TOC