.. # split from OEPlatformFunctions.rst:318

.. include:: ../substitutions

.. oe:namespace:: OEPlatform

.. meta::
   :keywords: OEFileTempPath

.. oe:function:: OEFileTempPath

   .. oe:api::

      std::string OEFileTempPath()

   Returns a system dependent directory for storing temporary files.

   On Linux or macOS this defaults to ``/tmp``, unless the ``TMPDIR``
   environment variable is specified, in which case that directory is
   used if it exists.

   On Windows, this defaults to ``C:\\Temp`` and then ``C:\\Tmp`` if
   that doesn't exist. If the ``TEMP`` or ``TMP`` environment
   variables are set and point to a valid directory, that directory is
   used instead.


