您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. using System;
  2. using System.Security.AccessControl;
  3. namespace Security2
  4. {
  5. public enum ApplyTo
  6. {
  7. ThisFolderOnly, //InheritanceFlags None / PropagationFlags None
  8. ThisFolderSubfoldersAndFiles, //InheritanceFlags ContainerInherit, ObjectInherit / PropagationFlags None
  9. ThisFolderAndSubfolders, //InheritanceFlags ContainerInherit / PropagationFlags None
  10. ThisFolderAndFiles, //InheritanceFlags ObjectInherit / PropagationFlags None
  11. SubfoldersAndFilesOnly, //InheritanceFlags ContainerInherit, ObjectInherit / PropagationFlags InheritOnly
  12. SubfoldersOnly, //InheritanceFlags ContainerInherit / PropagationFlags InheritOnly
  13. FilesOnly, //InheritanceFlags ObjectInherit / PropagationFlags InheritOnly
  14. ThisFolderSubfoldersAndFilesOneLevel, //InheritanceFlags ContainerInherit, ObjectInherit / PropagationFlags NoPropagateInherit
  15. ThisFolderAndSubfoldersOneLevel, //InheritanceFlags ContainerInherit / PropagationFlags NoPropagateInherit
  16. ThisFolderAndFilesOneLevel, //InheritanceFlags ObjectInherit / PropagationFlags NoPropagateInherit
  17. SubfoldersAndFilesOnlyOneLevel, //InheritanceFlags ContainerInherit, ObjectInherit / PropagationFlags InheritOnly, NoPropagateInherit
  18. SubfoldersOnlyOneLevel, //InheritanceFlags ContainerInherit / PropagationFlags InheritOnly, NoPropagateInherit
  19. FilesOnlyOneLevel, //InheritanceFlags ObjectInherit / PropagationFlags InheritOnly, NoPropagateInherit
  20. }
  21. [Flags]
  22. public enum FileSystemRights2 : uint
  23. {
  24. None = 0,
  25. ListDirectory = 1,
  26. ReadData = 1,
  27. CreateFiles = 2,
  28. CreateDirectories = 4,
  29. AppendData = 4,
  30. ReadExtendedAttributes = 8,
  31. WriteExtendedAttributes = 16,
  32. ExecuteFile = 32,
  33. Traverse = 32,
  34. DeleteSubdirectoriesAndFiles = 64,
  35. ReadAttributes = 128,
  36. WriteAttributes = 256,
  37. Write = 278,
  38. Delete = 65536,
  39. ReadPermissions = 131072,
  40. Read = 131209,
  41. ReadAndExecute = 131241,
  42. Modify = 197055,
  43. ChangePermissions = 262144,
  44. TakeOwnership = 524288,
  45. Synchronize = 1048576,
  46. FullControl = 2032127,
  47. GenericRead = 0x80000000,
  48. GenericWrite = 0x40000000,
  49. GenericExecute = 0x20000000,
  50. GenericAll = 0x10000000
  51. }
  52. [Flags]
  53. public enum SimpleFileSystemAccessRights
  54. {
  55. None = 0,
  56. Read = 1,
  57. Write = 2,
  58. Delete = 4
  59. }
  60. public enum GenericRights : uint
  61. {
  62. GENERIC_READ = 0x80000000,
  63. GENERIC_WRITE = 0x40000000,
  64. GENERIC_EXECUTE = 0x20000000,
  65. GENERIC_ALL = 0x10000000
  66. }
  67. public enum MappedGenericRights : uint
  68. {
  69. FILE_GENERIC_EXECUTE = FileSystemRights.ExecuteFile | FileSystemRights.ReadPermissions | FileSystemRights.ReadAttributes | FileSystemRights.Synchronize,
  70. FILE_GENERIC_READ = FileSystemRights.ReadAttributes | FileSystemRights.ReadData | FileSystemRights.ReadExtendedAttributes | FileSystemRights.ReadPermissions | FileSystemRights.Synchronize,
  71. FILE_GENERIC_WRITE = FileSystemRights.AppendData | FileSystemRights.WriteAttributes | FileSystemRights.WriteData | FileSystemRights.WriteExtendedAttributes | FileSystemRights.ReadPermissions | FileSystemRights.Synchronize,
  72. FILE_GENERIC_ALL = FileSystemRights.FullControl
  73. }
  74. }