|
■No62047 (みっく さん) に返信
こんなんで調べられると思います。 FileSystemRightsの判定は全部ではないです。
Imports System.IO Imports System.Security.Principal Imports System.Security.AccessControl
・・・
Dim DirInfo As New DirectoryInfo("ディレクトリパス") Dim sc = DirInfo.GetAccessControl For Each rl As FileSystemAccessRule In sc.GetAccessRules(True, True, GetType(NTAccount)) Dim sr = rl.FileSystemRights
Console.WriteLine("{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}", _ rl.IdentityReference.Value, rl.AccessControlType, _ (sr And FileSystemRights.AppendData) > 0, _ (sr And FileSystemRights.ChangePermissions) > 0, _ (sr And FileSystemRights.CreateDirectories) > 0, _ (sr And FileSystemRights.CreateFiles) > 0, _ (sr And FileSystemRights.Delete) > 0, _ (sr And FileSystemRights.DeleteSubdirectoriesAndFiles) > 0, _ (sr And FileSystemRights.ExecuteFile) > 0, _ (sr And FileSystemRights.ListDirectory) > 0, _ (sr And FileSystemRights.Read) > 0 _ ) Next
|