FileOptions.cs 1.3 KB

1234567891011121314151617181920212223242526272829
  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. namespace System.IO
  5. {
  6. // Maps to FILE_FLAG_DELETE_ON_CLOSE and similar values from winbase.h.
  7. // We didn't expose a number of these values because we didn't believe
  8. // a number of them made sense in managed code, at least not yet.
  9. [Flags]
  10. public enum FileOptions
  11. {
  12. // NOTE: any change to FileOptions enum needs to be
  13. // matched in the FileStream ctor for error validation
  14. None = 0,
  15. WriteThrough = unchecked((int)0x80000000),
  16. Asynchronous = unchecked((int)0x40000000), // FILE_FLAG_OVERLAPPED
  17. // NoBuffering = 0x20000000,
  18. RandomAccess = 0x10000000,
  19. DeleteOnClose = 0x04000000,
  20. SequentialScan = 0x08000000,
  21. // AllowPosix = 0x01000000, // FILE_FLAG_POSIX_SEMANTICS
  22. // BackupOrRestore,
  23. // DisallowReparsePoint = 0x00200000, // FILE_FLAG_OPEN_REPARSE_POINT
  24. // NoRemoteRecall = 0x00100000, // FILE_FLAG_OPEN_NO_RECALL
  25. // FirstPipeInstance = 0x00080000, // FILE_FLAG_FIRST_PIPE_INSTANCE
  26. Encrypted = 0x00004000, // FILE_ATTRIBUTE_ENCRYPTED
  27. }
  28. }