Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Microsoft C 6.0 - <b>rmtmp() remove temporary file created by tempfile()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 rmtmp()                 Remove Temporary File Created by tempfile()

 #include   <stdio.h>

 int        rmtmp(void);

    rmtmp() closes and deletes all temporary files in the current
    directory that were created by tmpfile().

    Returns:    The number of temporary files removed.

      Notes:    Use rmtmp() only in the directory in which the temporary
                files were created.

 Portability:   Does not support ANSI standard.

   -------------------------------- Example ---------------------------------
 The following statements open a temporary and remove it.

           #include <stdio.h>

           FILE *stream;
           char *buffr = "copy this to stream";

           main()
           {
               if ((stream = tmpfile()) != NULL) {
                   fprintf(stream,"%s",buffr);
                   printf("temp file opened & string written to it.\n");
                   rmtmp();
               }
               else
                   perror("unable to open temporary file\n");
           }



See Also: flushall() tmpfile() tmpnam()

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