1
0
mirror of https://github.com/chylex/Minecraft-Phantom-Panel.git synced 2025-08-20 13:49:51 +02:00
Files
.config
.run
.workdir
Agent
Common
Docker
Server
Utils
Phantom.Utils.Collections
Phantom.Utils.Collections.Tests
Phantom.Utils.Cryptography
Phantom.Utils.Events
Phantom.Utils.IO
Chmod.cs
Directories.cs
FileSize.cs
Files.cs
Paths.cs
Phantom.Utils.IO.csproj
StreamCopier.cs
Phantom.Utils.Rpc
Phantom.Utils.Runtime
Phantom.Utils.Runtime.Tests
.dockerignore
.gitattributes
.gitignore
AddMigration.bat
AddMigration.sh
Directory.Build.props
Directory.Build.targets
Dockerfile
LICENSE
Packages.props
PhantomPanel.sln
README.md
global.json

17 lines
438 B
C#

namespace Phantom.Utils.IO;
public static class Paths {
public static string ExpandTilde(string path) {
if (path == "~" || path.StartsWith("~/")) {
return string.Concat(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile, Environment.SpecialFolderOption.DoNotVerify), path.AsSpan(1));
}
else {
return path;
}
}
public static string NormalizeSlashes(string path) {
return path.Replace('\\', '/');
}
}