Update TemporaryFile to be stored in .../Kelwin/
This commit is contained in:
@ -60,12 +60,12 @@ namespace WGneu {
|
||||
private int Usages = 0;
|
||||
public string FilePath { get; private set; }
|
||||
|
||||
public TemporaryFile() : this("") {}
|
||||
public TemporaryFile() : this(null) {}
|
||||
|
||||
public TemporaryFile(string ext) : this(Path.GetTempPath(), ext) {}
|
||||
public TemporaryFile(string? ext) : this(Path.Combine(Path.GetTempPath(), "Kelwin"), ext) {}
|
||||
|
||||
public TemporaryFile(string dir, string ext) {
|
||||
FilePath = Path.Combine(dir, Path.GetRandomFileName() + ext);
|
||||
public TemporaryFile(string dir, string? ext) {
|
||||
FilePath = Path.Combine(dir, Path.GetRandomFileName().Replace(".", "") + (ext != null ? $".{ext}" : ""));
|
||||
Usages++;
|
||||
Create();
|
||||
}
|
||||
|
Reference in New Issue
Block a user