Functions

acsutilTempFile.h File Reference

#include <acsutil.h>
#include <ace/SString.h>
Include dependency graph for acsutilTempFile.h:

Go to the source code of this file.

Functions

ACE_CString getTempFileName (const ACE_TCHAR *fileNameEnvVar, const ACE_TCHAR *fileName)

Detailed Description

Header used to obtain temporary files.


Function Documentation

ACE_CString getTempFileName ( const ACE_TCHAR *  fileNameEnvVar,
const ACE_TCHAR *  fileName 
)

This function is use to generated a temporary file name, including the full path. The following policy is used:

  • if <fileNameEnvVar> is defined then file should be created using value (also path) from env. variable(s) and ACS_TMP is suppressed.
  • if ACS_TMP is defined than temporary files are put in ACS_TMP directory
  • if none of the above is defined, all files are put in $ACSDATA/tmp (only /tmp if $ACSDATA not defined) directory
    Parameters:
    fileNameEnvVar temp. file specific env. var. (overrides all options), e.g. "ACS_RECOVERY_FILE"
    fileName only bare file name, e.g. "local_cache.dat"
    Returns:
    Full path of the temporary file.