Sideway
output.to from Sideway
Draft for Information Only

Content

File Enum
 FileAccess Enum
  Fields
  Remarks
  Applies to
  See also
 FileAttributes Enum
  Fields
  Remarks
  Applies to
  See also
 FileMode Enum
  Fields
  Remarks
  Applies to
  See also
 FileOptions Enum
  Fields
  Remarks
  Applies to
 FileShare Enum
  Fields
   Remarks
  Applies to
  See also
 Source/Reference

File Enum

The Enum components used in .NET framework related to file are  FileAccess, FileAttributes, FileMode, FileOptions, FileShare , SearchOption, and SeekOrigin.

FileAccess Enum

Defines constants for read, write, or read/write access to a file.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

NamespaceSystem.IO AssembliesSystem.IO.FileSystem.Primitives.dll, mscorlib.dll, netstandard.dll, System.Runtime.dll
[System.Flags]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public enum FileAccess

Inheritance: Object->->ValueType->Enum->FileAccess

Attributes: FlagsAttribute, ComVisibleAttribute, SerializableAttribute

Fields

Read 1

Read access to the file. Data can be read from the file. Combine with Write for read/write access.

ReadWrite 3

Read and write access to the file. Data can be written to and read from the file.

Write 2

Write access to the file. Data can be written to the file. Combine with Read for read/write access.

Remarks

Applies to

.NET Framework: 4.8, 4.7.2, 4.7.1, 4.7, 4.6.2, 4.6.1, 4.6, 4.5.2, 4.5.1, 4.5, 4.0, 3.5, 3.0, 2.0, 1.1

See also

FileAttributes Enum

Provides attributes for files and directories.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

NamespaceSystem.IO AssembliesSystem.IO.FileSystem.Primitives.dll, mscorlib.dll, netstandard.dll, System.Runtime.dll
[System.Flags]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public enum FileAttributes

Inheritance: Object->ValueType->Enum->FileAttributes

Attributes: FlagsAttribute, ComVisibleAttribute, SerializableAttribute

Fields

Archive 32

This file is marked to be included in incremental backup operation. Windows sets this attribute whenever the file is modified, and backup software should clear it when processing the file during incremental backup.

Compressed 2048

The file is compressed.

Device 64

Reserved for future use.

Directory 16

The file is a directory. Directory is supported on Windows, Linux, and macOS.

Encrypted 16384

The file or directory is encrypted. For a file, this means that all data in the file is encrypted. For a directory, this means that encryption is the default for newly created files and directories.

Hidden 2

The file is hidden, and thus is not included in an ordinary directory listing. Hidden is supported on Windows, Linux, and macOS.

IntegrityStream 32768

The file or directory includes data integrity support. When this value is applied to a file, all data streams in the file have integrity support. When this value is applied to a directory, all new files and subdirectories within that directory, by default, include integrity support.

Normal 128

The file is a standard file that has no special attributes. This attribute is valid only if it is used alone. Normal is supported on Windows, Linux, and macOS.

NoScrubData 131072

The file or directory is excluded from the data integrity scan. When this value is applied to a directory, by default, all new files and subdirectories within that directory are excluded from data integrity.

NotContentIndexed 8192

The file will not be indexed by the operating system's content indexing service.

Offline 4096

The file is offline. The data of the file is not immediately available.

ReadOnly 1

The file is read-only. ReadOnly is supported on Windows, Linux, and macOS. On Linux and macOS, changing the ReadOnly flag is a permissions operation.

ReparsePoint 1024

The file contains a reparse point, which is a block of user-defined data associated with a file or a directory. ReparsePoint is supported on Windows, Linux, and macOS.

SparseFile 512

The file is a sparse file. Sparse files are typically large files whose data consists of mostly zeros.

System 4

The file is a system file. That is, the file is part of the operating system or is used exclusively by the operating system.

Temporary 256

The file is temporary. A temporary file contains data that is needed while an application is executing but is not needed after the application is finished. File systems try to keep all the data in memory for quicker access rather than flushing the data back to mass storage. A temporary file should be deleted by the application as soon as it is no longer needed.

Remarks

Applies to

.NET Framework: 4.8, 4.7.2, 4.7.1, 4.7, 4.6.2, 4.6.1, 4.6, 4.5.2, 4.5.1, 4.5, 4.0, 3.5, 3.0, 2.0, 1.1

See also

FileMode Enum

Specifies how the operating system should open a file.

NamespaceSystem.IO AssembliesSystem.IO.FileSystem.Primitives.dll, mscorlib.dll, netstandard.dll, System.Runtime.dll
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public enum FileMode

Inheritance: Object->->ValueType->Enum->FileMode

Attributes: ComVisibleAttribute, SerializableAttribute

Fields

Append 6

Opens the file if it exists and seeks to the end of the file, or creates a new file. This requires Append permission. FileMode.Append can be used only in conjunction with FileAccess.Write. Trying to seek to a position before the end of the file throws an IOException exception, and any attempt to read fails and throws a NotSupportedException exception.

Create 2

Specifies that the operating system should create a new file. If the file already exists, it will be overwritten. This requires Write permission. FileMode.Create is equivalent to requesting that if the file does not exist, use CreateNew; otherwise, use Truncate. If the file already exists but is a hidden file, an UnauthorizedAccessException exception is thrown.

CreateNew 1

Specifies that the operating system should create a new file. This requires Write permission. If the file already exists, an IOException exception is thrown.

Open 3

Specifies that the operating system should open an existing file. The ability to open the file is dependent on the value specified by the FileAccess enumeration. A FileNotFoundException exception is thrown if the file does not exist.

OpenOrCreate 4

Specifies that the operating system should open a file if it exists; otherwise, a new file should be created. If the file is opened with FileAccess.Read, Read permission is required. If the file access is FileAccess.Write, Write permission is required. If the file is opened with FileAccess.ReadWrite, both Read and Write permissions are required.

Truncate 5

Specifies that the operating system should open an existing file. When the file is opened, it should be truncated so that its size is zero bytes. This requires Write permission. Attempts to read from a file opened with FileMode.Truncate cause an ArgumentException exception.

Remarks

Applies to

.NET Framework: 4.8, 4.7.2, 4.7.1, 4.7, 4.6.2, 4.6.1, 4.6, 4.5.2, 4.5.1, 4.5, 4.0, 3.5, 3.0, 2.0, 1.1

See also

FileOptions Enum

Represents advanced options for creating a FileStream object.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

NamespaceSystem.IO AssembliesSystem.IO.FileSystem.dll, mscorlib.dll, netstandard.dll, System.Runtime.dll
[System.Flags]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public enum FileOptions

Inheritance: Object->ValueType->Enum->FileOptions

Attributes: FlagsAttribute, ComVisibleAttribute, SerializableAttribute

Fields

Asynchronous 1073741824

Indicates that a file can be used for asynchronous reading and writing.

DeleteOnClose 67108864

Indicates that a file is automatically deleted when it is no longer in use.

Encrypted 16384

Indicates that a file is encrypted and can be decrypted only by using the same user account used for encryption.

None 0

Indicates that no additional options should be used when creating a FileStream object.

RandomAccess 268435456

Indicates that the file is accessed randomly. The system can use this as a hint to optimize file caching.

SequentialScan 134217728

Indicates that the file is to be accessed sequentially from beginning to end. The system can use this as a hint to optimize file caching. If an application moves the file pointer for random access, optimum caching may not occur; however, correct operation is still guaranteed. Specifying this flag can increase performance in some cases.

WriteThrough -2147483648

Indicates that the system should write through any intermediate cache and go directly to disk.

Remarks

  • Specifying the FileOptions.SequentialScan flag can increase performance for applications that read large files using sequential access. Performance gains can be even more noticeable for applications that read large files mostly sequentially, but occasionally skip over small ranges of bytes.

Applies to

.NET Framework: 4.8, 4.7.2, 4.7.1, 4.7, 4.6.2, 4.6.1, 4.6, 4.5.2, 4.5.1, 4.5, 4.0, 3.5, 3.0, 2.0

FileShare Enum

Contains constants for controlling the kind of access other FileStream objects can have to the same file.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

NamespaceSystem.IO AssembliesSystem.IO.FileSystem.Primitives.dll, mscorlib.dll, netstandard.dll, System.Runtime.dll
[System.Flags]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public enum FileShare

Inheritance: Object->ValueType->Enum->FileShare

Attributes: FlagsAttribute, ComVisibleAttribute, SerializableAttribute

Fields

Delete 4

Allows subsequent deleting of a file.

Inheritable 16

Makes the file handle inheritable by child processes. This is not directly supported by Win32.

None 0

Declines sharing of the current file. Any request to open the file (by this process or another process) will fail until the file is closed.

Read 1

Allows subsequent opening of the file for reading. If this flag is not specified, any request to open the file for reading (by this process or another process) will fail until the file is closed. However, even if this flag is specified, additional permissions might still be needed to access the file.

ReadWrite 3

Allows subsequent opening of the file for reading or writing. If this flag is not specified, any request to open the file for reading or writing (by this process or another process) will fail until the file is closed. However, even if this flag is specified, additional permissions might still be needed to access the file.

Write 2

Allows subsequent opening of the file for writing. If this flag is not specified, any request to open the file for writing (by this process or another process) will fail until the file is closed. However, even if this flag is specified, additional permissions might still be needed to access the file.

Remarks

Applies to

.NET Framework: 4.8, 4.7.2, 4.7.1, 4.7, 4.6.2, 4.6.1, 4.6, 4.5.2, 4.5.1, 4.5, 4.0, 3.5, 3.0, 2.0, 1.1

See also

Source/Reference


©sideway

ID: 200700015 Last Updated: 7/15/2020 Revision: 0 Ref:

close

References

  1. Active Server Pages,  , http://msdn.microsoft.com/en-us/library/aa286483.aspx
  2. ASP Overview,  , http://msdn.microsoft.com/en-us/library/ms524929%28v=vs.90%29.aspx
  3. ASP Best Practices,  , http://technet.microsoft.com/en-us/library/cc939157.aspx
  4. ASP Built-in Objects,  , http://msdn.microsoft.com/en-us/library/ie/ms524716(v=vs.90).aspx
  5. Response Object,  , http://msdn.microsoft.com/en-us/library/ms525405(v=vs.90).aspx
  6. Request Object,  , http://msdn.microsoft.com/en-us/library/ms524948(v=vs.90).aspx
  7. Server Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms525541(v=vs.90).aspx
  8. Application Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms525360(v=vs.90).aspx
  9. Session Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms524319(8v=vs.90).aspx
  10. ASPError Object,  , http://msdn.microsoft.com/en-us/library/ms524942(v=vs.90).aspx
  11. ObjectContext Object (IIS),  , http://msdn.microsoft.com/en-us/library/ms525667(v=vs.90).aspx
  12. Debugging Global.asa Files,  , http://msdn.microsoft.com/en-us/library/aa291249(v=vs.71).aspx
  13. How to: Debug Global.asa files,  , http://msdn.microsoft.com/en-us/library/ms241868(v=vs.80).aspx
  14. Calling COM Components from ASP Pages,  , http://msdn.microsoft.com/en-us/library/ms524620(v=VS.90).aspx
  15. IIS ASP Scripting Reference,  , http://msdn.microsoft.com/en-us/library/ms524664(v=vs.90).aspx
  16. ASP Keywords,  , http://msdn.microsoft.com/en-us/library/ms524672(v=vs.90).aspx
  17. Creating Simple ASP Pages,  , http://msdn.microsoft.com/en-us/library/ms524741(v=vs.90).aspx
  18. Including Files in ASP Applications,  , http://msdn.microsoft.com/en-us/library/ms524876(v=vs.90).aspx
  19. ASP Overview,  , http://msdn.microsoft.com/en-us/library/ms524929(v=vs.90).aspx
  20. FileSystemObject Object,  , http://msdn.microsoft.com/en-us/library/z9ty6h50(v=vs.84).aspx
  21. http://msdn.microsoft.com/en-us/library/windows/desktop/ms675944(v=vs.85).aspx,  , ADO Object Model
  22. ADO Fundamentals,  , http://msdn.microsoft.com/en-us/library/windows/desktop/ms680928(v=vs.85).aspx
close

Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339

Reference 79

Computer

Hardware 249

Software

Application 213

Digitization 32

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 429

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2024 Sideway . All rights reserved Disclaimers last modified on 06 September 2019