ITempFilesNewTempFilePath Method

Creates a new unique name for a temporary file inside temp subdirectory of SettingsDirectory.

If the temporary file is created by the caller code then it will be deleted when the object which owns ITempFiles (for example, ISessionProfile) is disposed. The file may also be deleted earlier by the caller code.

  Note

File names which are created by NewTempFilePath(Guid, String, String) are not remembered by ITempFiles or its owner object, i.e., a new file name is generated on each call and the caller code is responsible for storing the returned file path.

Definition

Namespace: SMath.Manager
Assembly: SMath.Manager (in SMath.Manager.dll) Version: 1.74.9654.0
C#
string NewTempFilePath(
	Guid pluginId,
	string topic = null,
	string extension = ".tmp"
)

Parameters

pluginId  Guid
PublicGuid of the plug-in which requests a new temporary file name. If it is requested outside of any plug-in, Empty must be specified.
topic  String  (Optional)
Optional topic which is logged and can be used for identification of the temporary files when troubleshooting is required. For example: "Reserve Copy", "Expression Cache", etc.
extension  String  (Optional)
Extension to use for the temporary file.

Return Value

String
Full path to the temporary file which has a unique name and can be used by the caller code.

See Also