ITextDocument::SaveCopy Method (String^, Boolean)
Visual Studio 2015
Saves the contents of the TextBuffer to the given filePath.
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Parameters
- filePath
-
Type:
System::String^
The name of the file.
- overwrite
-
Type:
System::Boolean
true if filePath should be overwritten if it exists, otherwise false.
| Exception | Condition |
|---|---|
| ArgumentNullException | filePath is null. |
| UnauthorizedAccessException | An access error occurred during file save. |
| IOException | An I/O error occurred (including an error caused by attempting to overwrite an existing file when overwrite is false). |
| ObjectDisposedException | This object has been disposed. |
This call does not affect the IsDirty, LastSavedTime, and FilePath properties.
The FileActionOccurred event is not raised.
Show: