Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

7 лет назад
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. WriteData = 2,
  28. CreateFiles = 2,
  29. CreateDirectories = 4,
  30. AppendData = 4,
  31. ReadExtendedAttributes = 8,
  32. WriteExtendedAttributes = 16,
  33. ExecuteFile = 32,
  34. Traverse = 32,
  35. DeleteSubdirectoriesAndFiles = 64,
  36. ReadAttributes = 128,
  37. WriteAttributes = 256,
  38. Write = 278,
  39. Delete = 65536,
  40. ReadPermissions = 131072,
  41. Read = 131209,
  42. ReadAndExecute = 131241,
  43. Modify = 197055,
  44. ChangePermissions = 262144,
  45. TakeOwnership = 524288,
  46. Synchronize = 1048576,
  47. FullControl = 2032127,
  48. GenericRead = 0x80000000,
  49. GenericWrite = 0x40000000,
  50. GenericExecute = 0x20000000,
  51. GenericAll = 0x10000000
  52. }
  53. [Flags]
  54. public enum SimpleFileSystemAccessRights
  55. {
  56. None = 0,
  57. Read = 1,
  58. Write = 2,
  59. Delete = 4
  60. }
  61. public enum GenericRights : uint
  62. {
  63. GENERIC_READ = 0x80000000,
  64. GENERIC_WRITE = 0x40000000,
  65. GENERIC_EXECUTE = 0x20000000,
  66. GENERIC_ALL = 0x10000000
  67. }
  68. public enum MappedGenericRights : uint
  69. {
  70. FILE_GENERIC_EXECUTE = FileSystemRights.ExecuteFile | FileSystemRights.ReadPermissions | FileSystemRights.ReadAttributes | FileSystemRights.Synchronize,
  71. FILE_GENERIC_READ = FileSystemRights.ReadAttributes | FileSystemRights.ReadData | FileSystemRights.ReadExtendedAttributes | FileSystemRights.ReadPermissions | FileSystemRights.Synchronize,
  72. FILE_GENERIC_WRITE = FileSystemRights.AppendData | FileSystemRights.WriteAttributes | FileSystemRights.WriteData | FileSystemRights.WriteExtendedAttributes | FileSystemRights.ReadPermissions | FileSystemRights.Synchronize,
  73. FILE_GENERIC_ALL = FileSystemRights.FullControl
  74. }
  75. }