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 );
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. |
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.
NGWS Runtime Security:
FileIOPermissionAccess | Read flag required for read permission for the path on which to create the file. |