Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Clipper Tools One Guide - <b>tempfile()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
TEMPFILE()

Syntax:     TEMPFILE(<expC1>][,<expC2>][,<expN>])

Arguments:  <expC1> denotes the drive and directory in which to create
            the temporary.
            <expC2> denotes the extension required for the file.
            <expN> denotes the file attribute to be assigned to the file.

Returns:    A character string.
            The name of the temporary file will be returned.
            The function will return a null string if it is not possible to
            create a file.

Usage:      It is possible to use TEMPFILE() to produce a file with a
            unique name, or to produce a file which avoids any conflict
            with existing files, and is required for only a short period.
            The names constructed with TEMPFILE() will depend on the
            system date and the system time.  It will, for example, be
            possible to conceal the file (attribute "hidden") by specifying
            an attribute.  The attribute are coded as follows:

            Code        Definition
            ----        ----------
               0        Normal (no attribute set)
               1        Read only
               2        Hidden (concealed files)
               4        System files
               8        Volume label
              16        Directory (no file)
              32        Archive attribute

Notes:      The name of a temporary file will always be eight characters
            long and will cosist exclusively of figures.  The file will be
            created with a length of 0 bytes.  Only the attribute "archive"
            will be set if no file attribute is specified.

Library:    CT1.LIB


--------------------------------- Example ------------------------------

Examples:   * To set up a temporary file in the current
            * drive and directory.
            temp_file = TEMPFILE()

            * To set up a temporary file in the main
            * directory of drive E:.
            temp_file = TEMPFILE("E:\")

            * To set up a temporary file in the root
            * directory of drive A: with the extension
            * .TMP and the attribute of "hidden".
            temp_file = TEMPFILE("A:\","TMP",2)




Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson