CreateTemp Method

Object: SoftArtisans.SAFile
Syntax: CreateTemp([out] TempFilename As String)
Description:

This method creates a temporary file in the directory specified by the Path property and returns the filename, including the complete path.

Temporary files have the format "SAnnnn.TMP", where nnnnis a unique string.

If the Path property was not previously set, FileUpuses the system-defined Temporary Path (which is returned by the WIN32 GetTempPath() routine). Typically, this is "C:\Temp".

The path may be set through either the SAFile (file specific) Path property or the FileUp (for all files) Path property .

Note: An SaFile object cannot be created when using FileUp in .NET. Therefore, use of this method is not recommended. Use .NET's built-in File I/O classes instead.
Examples:
ASP <%
Set file = Server.CreateObject("SoftArtisans.SAFile")
file.Path = "C:\Temp\"
file.CreateTemp newTempFilename
%>
ASP.NET N/A - Not recommended

Copyright © 2010 SoftArtisans, Inc. All rights reserved.