The Labs \ Source Viewer \ SSCLI \ System.IO \ FileAccess

  1. // ==++==
  2. //
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. //
  14. // ==--==
  15. /*============================================================
  16. **
  17. ** Enum:  FileAccess
  18. **
  19. **
  20. ** Purpose: Enum describing whether you want read and/or write
  21. ** permission to a file.
  22. **
  23. **
  24. ===========================================================*/
  25. using System;
  26. namespace System.IO
  27. {
  28.     // Contains constants for specifying the access you want for a file.
  29.     // You can have Read, Write or ReadWrite access.
  30.     //
  31.     [Serializable(), Flags()]
  32.     [System.Runtime.InteropServices.ComVisible(true)]
  33.     public enum FileAccess
  34.     {
  35.         // Specifies read access to the file. Data can be read from the file and
  36.         // the file pointer can be moved. Combine with WRITE for read-write access.
  37.         Read = 1,
  38.        
  39.         // Specifies write access to the file. Data can be written to the file and
  40.         // the file pointer can be moved. Combine with READ for read-write access.
  41.         Write = 2,
  42.        
  43.         // Specifies read and write access to the file. Data can be written to the
  44.         // file and the file pointer can be moved. Data can also be read from the
  45.         // file.
  46.         ReadWrite = 3
  47.     }
  48. }

Developer Fusion