


      CCCCrrrreeeeaaaatttteeee((((3333BBBB))))                   ((((RRRRiiiiddddggggeeee))))                   CCCCrrrreeeeaaaatttteeee((((3333BBBB))))



      NNNNAAAAMMMMEEEE
           Create - create a file

      SSSSYYYYNNNNTTTTAAAAXXXX
           FUNCTION Create (name : String;
                            accessMode : Halfword;
                            allocSize : Integer;
                        var handle : Link;
                        var flag : Integer) : Error;

      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
           _C_r_e_a_t_e tries to create a new file, or prepares to rewrite an
           existing file.  The string nnnnaaaammmmeeee represents the pathname of
           the file.

           If the file did not exist, it is given access mode
           aaaacccccccceeeessssssssMMMMooooddddeeee, and a file size of zero. If the file did exist,
           its mode and owner remain unchanged, but the file size is
           truncated to zero length. In either case, the file will be
           allocated sufficient storage space to hold aaaallllllllooooccccSSSSiiiizzzzeeee bytes.

           The file is then opened for both reading and writing, and
           hhhhaaaannnnddddlllleeee will contain a link which is used for subsequent
           input/output operations on the file.

           A value is returned in ffffllllaaaagggg that indicates whether the file
           should be accessed using block mode only (0), character mode
           only (1), or either mode (2).

      SSSSEEEEEEEE AAAALLLLSSSSOOOO
           Close (3B), Delete (3B), Open (3B)

      NNNNOOOOTTTTEEEESSSS
           ErBadFileName is returned if the name is too long, or
           contains invalid characters.

           If the file could not be created because of insufficient
           secondary storage space, ErVolumeFull is returned.

           ErAccess is returned if either the file exists and its
           access mode is not writable, or the file does not exist but
           the directory in which it is to be created is not writable.

           ErCantModifyDir is returned if a directory with the pathname
           nnnnaaaammmmeeee already exists.










      Page 1                                                   (9010-E)



