CreateEditionContainerFile
You use the CreateEditionContainerFile function to create an empty edition container.
FUNCTION CreateEditionContainerFile
(editionFile: FSSpec; fdCreator: OSType;
editionFileNameScript: ScriptCode): OSErr;
editionFile
- The volume reference number, directory ID, and filename for the edition container being created.
fdCreator
- The creator type for the edition.
editionFileNameScript
- The script of the filename. (You can get this value from the
theFileScript field of an edition container specification record.)
DESCRIPTION
The CreateEditionContainerFile function creates an empty edition container file (it does not contain any formats). This function sets the file type of the edition to 'edtu'. As soon as you write data to the edition, the Edition Manager updates the type (to 'edtp' for graphics, 'edtt' for text, or 'edts' for sound). If your application writes both 'TEXT' and 'PICT' formats to the edition, the Edition Manager sets the file type to the type that was written first. If your application has a bundle, you should designate an icon for the appropriate edition types that you can write.
RESULT CODES
| noErr | 0 | No error |
| dskFulErr | -34 | Disk is full |
| nsvErr | -35 | No such volume |
| ioErr | -36 | I/O error |
| bdNamErr | -37 | Bad filename |
| fnfErr | -43 | File not found |
| dirNFErr | -120 | Directory not found |
| editionMgrInitErr | -450 | Manager not initialized |
SEE ALSO
For information on file specification records, see Inside Macintosh: Files. For an example of the use of CreateEditionContainerFile, see Listing 2-4 on page 2-33.