distributed-computing/tasks/mironov-eo/lab_2/worker-1/Program.cs
2023-10-30 23:41:47 +03:00

9 lines
265 B
C#

Random random = new Random();
var fileArray = Directory.GetFiles("/var/data");
string file = fileArray[random.Next(fileArray.Length)];
if (File.Exists("/var/result/data.txt"))
{
File.Delete("/var/result/data.txt");
}
File.Move(file, "/var/result/data.txt");