HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_TmpDir.h File Reference
#include "UT_API.h"
#include <stdio.h>
#include <SYS/SYS_StaticInit.h>
+ Include dependency graph for UT_TmpDir.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 SYSdeclareStaticObject (UT_API, theTmpDirLock)
 
UT_API const char * UTgetTmpDir ()
 
UT_API bool UTgetTmpName (UT_String &filename, const char *prefix=0, bool use_guid=false)
 
UT_API bool UTgetTmpNameInDir (UT_String &filename, const char *parent_dir, const char *prefix=0, bool use_guid=false)
 
UT_API const char * UTgetPersonalDir ()
 
UT_API const char * UTgetDesktopDir ()
 Returns the path to the platform specific user desktop directory. More...
 
UT_API const char * UTgetDefaultTmpDir ()
 
UT_API FILE * UTgetTmpFile ()
 

Function Documentation

SYSdeclareStaticObject ( UT_API  ,
theTmpDirLock   
)
UT_API const char* UTgetDefaultTmpDir ( )

This should only really be used by UT_EnvControl as the default for HOUDINI_TEMP_DIR when it's not set by the user. Use UTgetTmpDir() everywhere else so that the user may override the location.

UT_API const char* UTgetDesktopDir ( )

Returns the path to the platform specific user desktop directory.

UT_API const char* UTgetPersonalDir ( )

Returns the user directory. On Windows, this returns the /Users/<name> (ie. the equivalent to HOMEPATH%). For other platforms, it is the value of the HOME environment variable.

UT_API const char* UTgetTmpDir ( )

Return the directory to create temp files within. This differs depending on the OS and the HOUDINI_TEMP_DIR environment variable.

UT_API FILE* UTgetTmpFile ( )

Return a temporary file that will be deleted when it is closed. On some operating systems, the file will be cached in memory if it does not exceed a threshold size.

UT_API bool UTgetTmpName ( UT_String filename,
const char *  prefix = 0,
bool  use_guid = false 
)

Returns a path to a non-existent filename within UTgetTmpDir(). This is equivalent to UTgetTmpNameInDir(UTgetTmpDir(), prefix, filename). If the function fails, filename is NULL.

Note
This doesn't guarentee that the filename will still be non-existent by the time it is opened.
UT_API bool UTgetTmpNameInDir ( UT_String filename,
const char *  parent_dir,
const char *  prefix = 0,
bool  use_guid = false 
)

Returns a path to a non-existent filename within the given directory.

Note
This doesn't guarentee that the filename will still be non-existent by the time it is opened.