FileAccess.cs 987 B

1234567891011121314151617181920212223242526
  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. // Contains constants for specifying the access you want for a file.
  7. // You can have Read, Write or ReadWrite access.
  8. //
  9. [Flags]
  10. public enum FileAccess
  11. {
  12. // Specifies read access to the file. Data can be read from the file and
  13. // the file pointer can be moved. Combine with WRITE for read-write access.
  14. Read = 1,
  15. // Specifies write access to the file. Data can be written to the file and
  16. // the file pointer can be moved. Combine with READ for read-write access.
  17. Write = 2,
  18. // Specifies read and write access to the file. Data can be written to the
  19. // file and the file pointer can be moved. Data can also be read from the
  20. // file.
  21. ReadWrite = 3,
  22. }
  23. }