Class TempFileUtils
Namespace for methods that have to do with temporary file manipulations.
Inheritance
Inherited Members
Namespace: Sdl.FileTypeSupport.Framework.PreviewControls
Assembly: Sdl.FileTypeSupport.Framework.PreviewControls.dll
Syntax
public static class TempFileUtils
Methods
GetModifiedTempFilePath(String[], String)
Construct a temp file name based on an original file name (which may include a path). This can optionally be done using a list of file extension mappings given in extensionMaps parameter.
Declaration
public static string GetModifiedTempFilePath(string[] extensionMaps, string originalFilePath)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | extensionMaps | A list of file extension maps that can be used to map the original filename extension to a new file extension that can be used for previews. Each string in the extensionMaps array can either be in two formats. This first is the original file extension followed by '|' and then the new file extension that will be used for a preview. This will generate preview files using the second extension for all previews of file with the original file that matches first extension. E.g.
Will preview all .txt files by generating the a temp file using the .htm extension.
The second format that can be used for a string in the extensionMaps array is simply the file extension to be used for the preview and all original file extensions will be previewed using this preview file extension. E.g.
|
System.String | originalFilePath | The original file path of the file being previewed. |
Returns
Type | Description |
---|---|
System.String | A tempoary file name that can be used to generate a preview. |