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!

Directory.CreateFile

Creates a file in a specified path and opens it with read/write permission.

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

Parameters

fileName
The name of the new file.

Return Value

The name of the new file including its full path.

Exceptions

Exception Type Condition
AccessException filename is a directory or access is denied.
ArgumentNullException filename is null.
DirectoryNotFoundException Part of the specified directory is not found.
IOException File name, directory name, or volume label syntax is incorrect.
SecurityException The caller does not have the required permission.
ArgumentException filename is an empty string ("").

Remarks

Note   Path names are limited to 248 characters, and file names are limited to 260 characters.

Requirements

NGWS Runtime Security:

FileIOPermissionAccess Write permission for the path.

See Also

Directory Class | Directory Members | System.IO Namespace