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 (String, FileMode)

Opens a file on the specified path and in the specified mode.

[Visual Basic]
Overloads Public Shared Function Open( _
   ByVal path As String, _
   ByVal mode As FileMode _
) As Stream
[C#]
public static Stream Open(
   string path,
   FileMode mode
);
[C++]
public: static Stream* Open(
   String* path,
   FileMode mode
);
[JScript]
public static function Open(
   path : String,
   mode : FileMode
) : Stream;

Parameters

path
[To be supplied.]
mode
[To be supplied.]

Return Value

A file opened in the specified mode and path, with read/write access and unshared.

Exceptions

Exception Type Condition
SecurityException The caller does not have the required permission.
ArgumentException path is empty or contains only whitespaces.

Requirements

NGWS Runtime Security:

FileIOPermissionAccess Read permission to the path.

See Also

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