NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

File.Open (FileMode, FileAccess, FileShare)

Opens a file in the specified mode with read, write, or read/write access and the specified sharing option.

[Visual Basic]
Overloads Public Function Open( _
   ByVal mode As FileMode, _
   ByVal access As FileAccess, _
   ByVal share As FileShare _
) As Stream
[C#]
public Stream Open(
   FileMode mode,
   FileAccess access,
   FileShare share
);
[C++]
public: Stream* Open(
   FileMode mode,
   FileAccess access,
   FileShare share
);
[JScript]
public function Open(
   mode : FileMode,
   access : FileAccess,
   share : FileShare
) : Stream;

Parameters

mode
One of the six FileMode constants.
access
One of the three FileAccess constants.
share
One of the four FileShare constants.

Return Value

A FileStream opened with the specified mode, access, sharing options.

Exceptions

Exception Type Condition
SecurityException The caller does not have the required permission.

Requirements

NGWS Runtime Security:

FileIOPermissionAccess Read permission to the path.

See Also

File Class | File Members | System.IO Namespace | File.Open Overload List