main #3

Merged
Hlop4ik4 merged 237 commits from v.moiseev/distributed-computing:main into main 2024-01-06 17:16:53 +04:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit cf0e532652 - Show all commits

View File

@ -4,7 +4,7 @@ using System.IO;
using System.Text;
string[] files = Directory.GetFiles("../../../../var/data");
string[] files = Directory.GetFiles("/var/data");
string minFilePath = "";
long minFileNameLength = long.MaxValue;
foreach (var filePath in files)
@ -24,7 +24,7 @@ using (FileStream sourceStream = File.OpenRead(minFilePath))
await sourceStream.ReadAsync(buffer, 0, buffer.Length);
string text = Encoding.Default.GetString(buffer);
using (FileStream targetStream = new FileStream("../../../../var/result/data.txt", FileMode.OpenOrCreate))
using (FileStream targetStream = new FileStream("/var/result/data.txt", FileMode.OpenOrCreate))
{
targetStream.SetLength(0);
byte[] textBytes = Encoding.Default.GetBytes(text);

View File

@ -3,7 +3,7 @@ using System.IO;
using System.Text;
string[] numbers;
using (FileStream fstream = File.OpenRead("../../../../var/result/data.txt"))
using (FileStream fstream = File.OpenRead("/var/result/data.txt"))
{
byte[] buffer = new byte[fstream.Length];
await fstream.ReadAsync(buffer, 0, buffer.Length);
@ -24,7 +24,7 @@ foreach (var number in numbers)
int maxNumberSquared = maxNumber * maxNumber;
using (FileStream fstream = new FileStream("../../../../var/result/result.txt", FileMode.OpenOrCreate))
using (FileStream fstream = new FileStream("/var/result/result.txt", FileMode.OpenOrCreate))
{
byte[] buffer = Encoding.Default.GetBytes(maxNumberSquared.ToString());
await fstream.WriteAsync(buffer, 0, buffer.Length);