change compiler options, add function to tools.cs
This commit is contained in:
parent
7c1c5be4f6
commit
0ae14c7a67
2 changed files with 16 additions and 1 deletions
|
@ -5,7 +5,6 @@
|
||||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<SignAssembly>false</SignAssembly>
|
<SignAssembly>false</SignAssembly>
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<Configurations>Debug;Release;DebPub;KVPBuild</Configurations>
|
<Configurations>Debug;Release;DebPub;KVPBuild</Configurations>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
16
Tools.cs
16
Tools.cs
|
@ -1,5 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
|
@ -64,6 +65,21 @@ namespace LibZNI
|
||||||
var base64EncodedBytes = System.Convert.FromBase64String(base64EncodedData);
|
var base64EncodedBytes = System.Convert.FromBase64String(base64EncodedData);
|
||||||
return System.Text.Encoding.UTF8.GetString(base64EncodedBytes);
|
return System.Text.Encoding.UTF8.GetString(base64EncodedBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string GoUpOneLevel(string path)
|
||||||
|
{
|
||||||
|
string[] paths = path.Split(new[] { '/', '\\' });
|
||||||
|
|
||||||
|
List<string> pathList = paths.ToList();
|
||||||
|
pathList.Remove(pathList[pathList.Count-1]);
|
||||||
|
|
||||||
|
string pathListStr = "";
|
||||||
|
foreach(string s in pathList)
|
||||||
|
{
|
||||||
|
pathListStr += s + "/";
|
||||||
|
}
|
||||||
|
return pathListStr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue