This class is used for storing files as part of a configuration. Typically, the files stored are ini files from a LabVIEW VIs, which are usually less than 100k in size. The files are stored in the configuration as a byte array, which is converted back into the "real" file when the configuration is loaded. The file is only intended to be converted at the point of saving the configuration otherwise it just wastes memory.
More...
|
| AssociatedFile () |
| Default constructor More...
|
|
| AssociatedFile (String fileName) |
| Recommended constructor for use in code. More...
|
|
Boolean | ConvertFileToByteArray () |
| Method for converting a file to a byte array. More...
|
|
void | CreateFile () |
| Method for creating a file from the saved byte array. Will back-up the existing version of the file and replace it with the new version. If the write fails then it won't automatically roll back as this could be disastrous! If the file is corrupted in any way, LabVIEW will not be able to load it. More...
|
|
Boolean | HasBeenModified () |
| Method for checking whether the file was modified. More...
|
|
void | RestoreOriginal () |
| Restores the on disk copy of the associated file to what was originally in the configuration. In other words, it overwrites the file with the .orig file. More...
|
|
This class is used for storing files as part of a configuration. Typically, the files stored are ini files from a LabVIEW VIs, which are usually less than 100k in size. The files are stored in the configuration as a byte array, which is converted back into the "real" file when the configuration is loaded. The file is only intended to be converted at the point of saving the configuration otherwise it just wastes memory.
Definition at line 18 of file AssociatedFile.cs.
Seci.Definitions.AssociatedFile.AssociatedFile |
( |
| ) |
|
|
inline |
Seci.Definitions.AssociatedFile.AssociatedFile |
( |
String |
fileName | ) |
|
|
inline |
Recommended constructor for use in code.
- Parameters
-
fileName | The full filepath of the file to save |
Definition at line 45 of file AssociatedFile.cs.
Boolean Seci.Definitions.AssociatedFile.ConvertFileToByteArray |
( |
| ) |
|
|
inline |
Method for converting a file to a byte array.
- Returns
- False if there is an error
Definition at line 55 of file AssociatedFile.cs.
void Seci.Definitions.AssociatedFile.CreateFile |
( |
| ) |
|
|
inline |
Method for creating a file from the saved byte array. Will back-up the existing version of the file and replace it with the new version. If the write fails then it won't automatically roll back as this could be disastrous! If the file is corrupted in any way, LabVIEW will not be able to load it.
Definition at line 93 of file AssociatedFile.cs.
void Seci.Definitions.AssociatedFile.CreateOriginal |
( |
| ) |
|
|
inlineprivate |
Creates a copy of the file but with the .orig extension
Definition at line 136 of file AssociatedFile.cs.
DateTime Seci.Definitions.AssociatedFile.getLastModifiedDateTime |
( |
| ) |
|
|
inlineprivate |
Method for getting the last time when the file was modified.
- Returns
- Last modified datetime
Definition at line 212 of file AssociatedFile.cs.
Boolean Seci.Definitions.AssociatedFile.HasBeenModified |
( |
| ) |
|
|
inline |
Method for checking whether the file was modified.
- Returns
- True if modified
Definition at line 190 of file AssociatedFile.cs.
void Seci.Definitions.AssociatedFile.RestoreOriginal |
( |
| ) |
|
|
inline |
Restores the on disk copy of the associated file to what was originally in the configuration. In other words, it overwrites the file with the .orig file.
Definition at line 155 of file AssociatedFile.cs.
void Seci.Definitions.AssociatedFile.updateModifiedTime |
( |
| ) |
|
|
inlineprivate |
Byte [] Seci.Definitions.AssociatedFile._fileData |
|
private |
String Seci.Definitions.AssociatedFile._fileLocation |
|
private |
DateTime Seci.Definitions.AssociatedFile._lastModifiedTime |
|
private |
String Seci.Definitions.AssociatedFile._owningComponent |
|
private |
Byte [] Seci.Definitions.AssociatedFile.FileData |
|
getset |
String Seci.Definitions.AssociatedFile.FileLocation |
|
getset |
String Seci.Definitions.AssociatedFile.OwningComponent |
|
getset |
The documentation for this class was generated from the following file:
- /isis2/instcontrol_temp/NewSECI/Sample_Environment_Control_Interface/Seci/Definitions/AssociatedFile.cs