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 Constructor

Creates a File object.

[Visual Basic]
Public Sub New( _
   ByVal fileName As String _
)
[C#]
public File(
   string fileName
);
[C++]
public: File(
   String* fileName
);
[JScript]
public function File(
   fileName : String
);

Parameters

fileName
The fully qualified name of the new file, or the relative file name. However, the security check will get the fully qualified name before doing the security check.

Exceptions

Exception Type Condition
ArgumentNullException filename is null.
SecurityException The caller does not have the required permission.
ArgumentException The file name is empty or contains only whitespaces.

Remarks

You may specify either the fully qualified or the relative file name, but the security check will get the fully qualified name before doing the security check.

Requirements

NGWS Runtime Security:

FileIOPermissionAccess Read flag required for read permission for the path on which to create the file.

See Also

File Class | File Members | System.IO Namespace