Get person files to auto-backup when we save them.
This commit is contained in:
@ -312,6 +312,7 @@ namespace EduNetworkBuilder
|
||||
public static int DefaultPasswordLen = 6;
|
||||
public static int DefaultMachinePasswordLen = 20;
|
||||
public static int DefaultSaltLen = 50;
|
||||
public static int NormalRotation = 5;
|
||||
|
||||
public static string AllowedPasswordCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-=!~@#$%^&*()_+{}[]/?<>,.";
|
||||
public static string AllowedUsernameCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890._";
|
||||
@ -1039,6 +1040,16 @@ namespace EduNetworkBuilder
|
||||
MoveFileWithRotation(SourceFileWithDir, StandardDest, rotation);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Move a file out of the way, making a rotating backup at the same time. backup to appdata
|
||||
/// </summary>
|
||||
/// <param name="SourceFileWithDir">A source filename with a directory</param>
|
||||
public static void MoveFileWithRotation(string SourceFileWithDir)
|
||||
{
|
||||
string StandardDest = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "EduNetworkBuilder");
|
||||
MoveFileWithRotation(SourceFileWithDir, StandardDest, NB.NormalRotation);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given a file, rotate it with the specified number of versions.
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user