---
title: "FileCache..::.GetPrivateTempFileName Method (String, Boolean)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_AjaxControls_FileCache_GetPrivateTempFileName_2_7ffb34cc.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# FileCache.GetPrivateTempFileName Method (String, Boolean)
 
Generates an unique temporary file or folder name for the private cache.
 
**Namespace:** [Aurigma.GraphicsMill.AjaxControls](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_AjaxControls.htm.md)
 **Assembly:** Aurigma.GraphicsMill.AjaxControls (in Aurigma.GraphicsMill.AjaxControls.dll)
 
## Syntax
  
```
Public Function GetPrivateTempFileName ( _extension As String, _isDirectory As Boolean _
) As String
```
 
```csharp
public string GetPrivateTempFileName(string extension,bool isDirectory
)
```
 
### Parameters
 
 - extension
     - Type: [System.String](http://msdn2.microsoft.com/en-us/s1wwdcbf)
An extension to append to the generated name.

 - isDirectory
     - Type: [System.Boolean](http://msdn2.microsoft.com/en-us/a28wyd50)
A [Boolean](http://msdn2.microsoft.com/en-us/a28wyd50) value which specifies whether to generate name for a file or folder.
 
### Return Value
An unique name of the temporary file or folder in the private cache (without full path).
 
## Remarks
  
Note, this method does not create a file or folder with generated name. It just returns a name which is guarantied unique in the private cache folder. You should create this file manually.
 
To get a full physical path to the private cache, use the [GetAbsolutePrivateCachePath(String)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_AjaxControls_FileCache_GetAbsolutePrivateCachePath_1_bb3a7a4f.htm.md) method.
   
## See Also

### Reference

- [FileCache Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_AjaxControls_FileCache.htm.md)
- [GetPrivateTempFileName Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_AjaxControls_FileCache_GetPrivateTempFileName.htm.md)
- [Aurigma.GraphicsMill.AjaxControls Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_AjaxControls.htm.md)
