GeoEco.DataManagement.Directories.Directory.CreateTemporaryDirectory
- classmethod Directory.CreateTemporaryDirectory()
Creates a directory suitable for holding temporary files.
The directory’s path will take the form
parentDirectory/GeoEcoTemp/randomName(On Windows computers, backslashes will be used instead of forward slashes.)parentDirectorywill be one of the following locations (the first one that is found to exist):The ArcGIS geoprocessor’s
arcpy.env.ScratchWorkspaceif it has been set to something.The directory named by the
TMPDIRenvironment variable.The directory named by the
TEMPenvironment variable.The directory named by the
TMPenvironment variable.A platform-specific location: - On Windows, the directories
C:\TEMP,C:\TMP,\TEMP, and\TMP, in that order. - On all other platforms, the directories/tmp,/var/tmp, and/usr/tmp, in that order.As a last resort, the current working directory of the process hosting the Python interpreter.
randomNamewill be a random, non-existing name beginning withtmp.You must manually delete the temporary directory when you are finished using it. (It will not be automatically deleted for you.)
- Returns:
Path of the newly-created temporary directory.
- Return type: