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;
The name of the new file including its full path.
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 (""). |
Note Path names are limited to 248 characters, and file names are limited to 260 characters.
NGWS Runtime Security:
FileIOPermissionAccess | Write permission for the path. |