This commit is contained in:
2025-05-13 01:22:44 +03:00
parent 245b02f962
commit 03602b8138
27 changed files with 2078 additions and 1 deletions
+28
View File
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace Actions.Library {
public static class TempDirectory {
public static string New() {
var assemblyPath = Assembly.GetEntryAssembly().Location;
var assemblyDir = Path.GetDirectoryName(assemblyPath);
var tmpDir = Path.Combine(assemblyDir, "Temp");
Directory.CreateDirectory(tmpDir);
int id = 0;
while (true) {
var dir = Path.Combine(tmpDir, id.ToString());
if (!Directory.Exists(dir)) {
Directory.CreateDirectory(dir);
return dir;
}
++id;
}
}
}
}