FileOptions.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT license.
  3. // See the LICENSE file in the project root for more information.
  4. using System;
  5. using System.Runtime.InteropServices;
  6. namespace System.IO
  7. {
  8. // Maps to FILE_FLAG_DELETE_ON_CLOSE and similar values from winbase.h.
  9. // We didn't expose a number of these values because we didn't believe
  10. // a number of them made sense in managed code, at least not yet.
  11. [Flags]
  12. public enum FileOptions
  13. {
  14. // NOTE: any change to FileOptions enum needs to be
  15. // matched in the FileStream ctor for error validation
  16. None = 0,
  17. WriteThrough = unchecked((int)0x80000000),
  18. Asynchronous = unchecked((int)0x40000000), // FILE_FLAG_OVERLAPPED
  19. // NoBuffering = 0x20000000,
  20. RandomAccess = 0x10000000,
  21. DeleteOnClose = 0x04000000,
  22. SequentialScan = 0x08000000,
  23. // AllowPosix = 0x01000000, // FILE_FLAG_POSIX_SEMANTICS
  24. // BackupOrRestore,
  25. // DisallowReparsePoint = 0x00200000, // FILE_FLAG_OPEN_REPARSE_POINT
  26. // NoRemoteRecall = 0x00100000, // FILE_FLAG_OPEN_NO_RECALL
  27. // FirstPipeInstance = 0x00080000, // FILE_FLAG_FIRST_PIPE_INSTANCE
  28. Encrypted = 0x00004000, // FILE_ATTRIBUTE_ENCRYPTED
  29. }
  30. }