|
@@ -3,6 +3,7 @@ using System.Threading.Tasks;
|
|
|
using System.Net;
|
|
|
using System.IO;
|
|
|
|
|
|
+
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
|
|
namespace HyperCube.Pages
|
|
@@ -22,19 +23,27 @@ namespace HyperCube.Pages
|
|
|
|
|
|
//public string mypath = @"Wallet";
|
|
|
public string mypath = @"getfile";
|
|
|
- public string getFiles()
|
|
|
+ public string getFiles(string wallet)
|
|
|
{
|
|
|
- //mypath = @"c:\Users\Администратор\AppData\Local\Ethereum\rinkeby\keystore\";
|
|
|
+ mypath = @"c:\Users\Администратор\AppData\Local\Ethereum\rinkeby\keystore\";
|
|
|
+ //string filepath = @"c:\Users\Администратор\AppData\Local\Ethereum\rinkeby\keystore\UTC--2021-04-21T07-20-25.392048000Z--1841462ee3e39af00de42b067853c58ab7e18876";
|
|
|
+ //text = File.ReadAllText(filepath);
|
|
|
string toprint = "";
|
|
|
var files = Directory.GetFiles(mypath);
|
|
|
|
|
|
foreach (var file in files)
|
|
|
{
|
|
|
string fileName = file.Substring(mypath.Length + 1);
|
|
|
- //var name = fileName.Split("_");
|
|
|
+ var name = fileName.Split("--");
|
|
|
try
|
|
|
{
|
|
|
- Console.WriteLine($"fileName {fileName}");
|
|
|
+ var filepath = mypath + file;
|
|
|
+ if ("0x" + name[2] == wallet)
|
|
|
+ {
|
|
|
+ var content = File.ReadAllText(file);
|
|
|
+ Console.WriteLine($"fileName {name[2]} path {filepath} {"0x" + name[2] == wallet} first {content[0]}");
|
|
|
+ return content;
|
|
|
+ }
|
|
|
//uint fileTaskId = Convert.ToUInt32(name[0]);
|
|
|
//if (fileTaskId == taskid)
|
|
|
//{
|