иСПРАВ
This commit is contained in:
parent
ca857e1581
commit
cf0e532652
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user