Fix temp file reuse/cleanup. Add retain aax option.
This commit is contained in:
parent
8af60b56b6
commit
05f25a88c6
13 changed files with 90 additions and 55 deletions
|
|
@ -29,14 +29,14 @@ namespace FileManager
|
|||
public string IllegalCharacterReplacements { get; set; }
|
||||
|
||||
/// <summary>Generate a valid path for this file or directory</summary>
|
||||
public string GetFilePath()
|
||||
public string GetFilePath(bool returnFirstExisting = false)
|
||||
{
|
||||
var filename = Template;
|
||||
|
||||
foreach (var r in ParameterReplacements)
|
||||
filename = filename.Replace($"<{formatKey(r.Key)}>", formatValue(r.Value));
|
||||
|
||||
return FileUtility.GetValidFilename(filename, IllegalCharacterReplacements);
|
||||
return FileUtility.GetValidFilename(filename, IllegalCharacterReplacements, returnFirstExisting);
|
||||
}
|
||||
|
||||
private static string formatKey(string key)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue