BeatSaber-version-changer/controller/helper/staticHelpers.cs

26 lines
669 B
C#
Raw Normal View History

2022-05-14 19:00:01 +02:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;
namespace BeatSaber_Versions.controller.helper
{
internal class staticHelpers
{
static public bool IsSymbolic(string path)
{
FileInfo pathInfo = new FileInfo(path);
return pathInfo.Attributes.HasFlag(FileAttributes.ReparsePoint);
}
static public bool IsElevated
{
get
{
return new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator);
}
}
}
}