Class AutoSaveDiskOperations
Static class to handle auto-save templates and bugs to persist to disk and load to memory methods.
Inherited Members
Namespace: Phoenix.Aruba
Assembly: Phoenix.Plugin.Aruba.dll
Syntax
public static class AutoSaveDiskOperations
Methods
View SourceCopyFilesToDirectory(List<string>, string)
Copies a list of files to the given directory.
Declaration
public static void CopyFilesToDirectory(List<string> files, string directory)
Parameters
Type | Name | Description |
---|---|---|
List<string> | files | A list of files. |
string | directory | A directory. |
CreateDirectory(string)
Creates a directory if it does not exist yet.
Declaration
public static void CreateDirectory(string directory)
Parameters
Type | Name | Description |
---|---|---|
string | directory | The directory to create. |
DeleteDirectory(string)
Deletes a given directory.
Declaration
public static void DeleteDirectory(string directory)
Parameters
Type | Name | Description |
---|---|---|
string | directory | The directory to delete. |
DeleteTemplateFromDisk(string)
Static method that deletes the template auto-save file.
Declaration
public static Task DeleteTemplateFromDisk(string fullPath)
Parameters
Type | Name | Description |
---|---|---|
string | fullPath | The path including the file. |
Returns
Type | Description |
---|---|
Task | A Task representing the asynchronous operation. |
DeleteTemplateFromDisk(string, string)
Static method that deletes the template auto-save file.
Declaration
public static Task DeleteTemplateFromDisk(string path, string templateId)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path that contains the file. |
string | templateId | The template id. |
Returns
Type | Description |
---|---|
Task | A Task representing the asynchronous operation. |
GetTemplateDefinitionFromBackupDocument(IBackupDocument, string)
Gets the template definition from the backup document.
Declaration
public static Task<TemplateDefinition> GetTemplateDefinitionFromBackupDocument(IBackupDocument backupDocument, string autoSaverPath)
Parameters
Type | Name | Description |
---|---|---|
IBackupDocument | backupDocument | The backup to restore. |
string | autoSaverPath | The path that contains the file. |
Returns
Type | Description |
---|---|
Task<TemplateDefinition> | The TemplateDefinition object that was loaded from the saved file. |
GetTemplateFromDisk(string, string)
Static method that loads a template definition from a temp file.
Declaration
public static Task<TemplateDefinition> GetTemplateFromDisk(string path, string templateId)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path that contains the file. |
string | templateId | The template Id. |
Returns
Type | Description |
---|---|
Task<TemplateDefinition> | The TemplateDefinition object that was loaded from the saved file. |
LoadImage(string)
Loads an image for the given file name.
Declaration
public static Image LoadImage(string fileName)
Parameters
Type | Name | Description |
---|---|---|
string | fileName | The file name of the image to load. |
Returns
Type | Description |
---|---|
Image |
SaveImage(Image, string)
Saves an image for the given file name.
Declaration
public static void SaveImage(Image image, string fileName)
Parameters
Type | Name | Description |
---|---|---|
Image | image | The image to save. |
string | fileName | The file name to save the image as. |
SaveTemplateToDisk(string, TemplateDefinition)
Static method that saves the template definition.
Declaration
public static Task SaveTemplateToDisk(string path, TemplateDefinition definition)
Parameters
Type | Name | Description |
---|---|---|
string | path | The file system path to save the document into. |
TemplateDefinition | definition | The TemplateDefinition to save. |
Returns
Type | Description |
---|---|
Task | A Task representing the asynchronous operation. |