AutoGen - The Automated Program Generator: 7.5.6.7 Arg Type File Name

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

#### 7.5.6.7 Arg Type File Name

`arg-type = file;`

This argument type will have some validations on the argument and, optionally, actually open the file. You must specify several additonal attributes for the option:

‘`file-exists`’

  If not specified or empty, then the directory portion of the name is checked. The directory must exist or the argument is rejected and the usage procedure is invoked.

  Otherwise, both the directory as above and the full name is tested for existence. If the value begins with the two letters “no”, then the file must not pre-exist. Otherwise, the file is expected to exist.

‘`open-file`’

  If not specified or empty, the file is left alone. If the value begins with the four letters “desc”[riptor], then `open(2)` is used and `optArg.argFd` is set. Otherwise, the file is opened with `fopen` and `optArg.argFp` is set.

‘`file-mode`’

  If “open-file” is set and not empty, then you must specify the open mode. Set the value to the flag bits or mode string as appropriate for the open type.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

This document was generated by Bruce Korb on July 25, 2010 using texi2html 1.82.