Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Nanforum Toolkit v2.1 Reference Guide - <b>ft_tempfil()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FT_TEMPFIL()
 Create a file with a unique name
------------------------------------------------------------------------------

 Syntax

      FT_TEMPFIL( [ <cPath> ] [, <lHide> ] ) -> cFileSpec

 Arguments

     <cPath> is the directory where you want to create the temporary
     file.  If you omit this argument, the root of the current drive
     is assumed ("\").

     If <lHide> is .T., then the file will be created with the hidden
     attribute set.  The default is .F.

 Returns

     <cFileSpec> should be your path, including the name of the newly
     created unique file.  Use this with FOPEN(), etc.

     If a DOS error occurred when trying to create the file, a
     null string will be returned.

 Description

     This function uses DOS Interrupt 21, service 5Ah (Create temporary
     file) to create a unique filename in a directory you specify.
     There will be no extension.  After the file is created, you may
     then fopen() it and do any i/o you need (see the test driver
     in the source code).

     This function requires FT_INT86().

 Examples

     Create a unique file in the root of the current drive:

            myFile := FT_TEMPFIL()

     Create a unique file in the current directory and hide it:

            myFile := FT_TEMPFIL(".\", .t.)

     Create a unique file on another drive, but do not hide it:

            myFile := FT_TEMPFIL("e:\nanfor\src\")

 Source: TEMPFILE.PRG

 Author: Glenn Scott

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