Improve file operations, layout memory, and drive status.
Add a sequential file-operations queue with pause, reorder, and optional auto-clear; persist window size and tree width; show free space; and clear leftover indexing status. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
27
src/Explorer.Windows/WindowsElevatedScanService.cs
Normal file
27
src/Explorer.Windows/WindowsElevatedScanService.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System.Security.Principal;
|
||||
using Explorer.Application;
|
||||
|
||||
namespace Explorer.Windows;
|
||||
|
||||
public sealed class WindowsElevatedScanService : IElevatedScanService
|
||||
{
|
||||
public bool IsElevated
|
||||
{
|
||||
get
|
||||
{
|
||||
try
|
||||
{
|
||||
using var identity = WindowsIdentity.GetCurrent();
|
||||
return new WindowsPrincipal(identity).IsInRole(WindowsBuiltInRole.Administrator);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool CanRequestElevation => false;
|
||||
|
||||
public string ProtectedContentHint => "Protected content requires administrator privileges.";
|
||||
}
|
||||
Reference in New Issue
Block a user