ITextDocument.SaveCopy Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| SaveCopy(String, Boolean) |
Saves the contents of the TextBuffer to the given |
| SaveCopy(String, Boolean, Boolean) |
Saves the contents of the TextBuffer to the given |
SaveCopy(String, Boolean)
Saves the contents of the TextBuffer to the given filePath.
public:
void SaveCopy(System::String ^ filePath, bool overwrite);
public:
void SaveCopy(Platform::String ^ filePath, bool overwrite);
void SaveCopy(std::wstring const & filePath, bool overwrite);
public void SaveCopy(string filePath, bool overwrite);
abstract member SaveCopy : string * bool -> unit
Public Sub SaveCopy (filePath As String, overwrite As Boolean)
Parameters
- filePath
- String
The name of the file.
- overwrite
- Boolean
true if filePath should be overwritten if it exists, otherwise false.
Exceptions
filePath is null.
An I/O error occurred (including an error caused by attempting
to overwrite an existing file when overwrite is false).
An access error occurred during file save.
This object has been disposed.
Remarks
This call does not affect the IsDirty, LastSavedTime, and FilePath properties. The FileActionOccurred event is not raised.
Applies to
SaveCopy(String, Boolean, Boolean)
Saves the contents of the TextBuffer to the given filePath.
public:
void SaveCopy(System::String ^ filePath, bool overwrite, bool createFolder);
public:
void SaveCopy(Platform::String ^ filePath, bool overwrite, bool createFolder);
void SaveCopy(std::wstring const & filePath, bool overwrite, bool createFolder);
public void SaveCopy(string filePath, bool overwrite, bool createFolder);
abstract member SaveCopy : string * bool * bool -> unit
Public Sub SaveCopy (filePath As String, overwrite As Boolean, createFolder As Boolean)
Parameters
- filePath
- String
The name of the file.
- overwrite
- Boolean
true if filePath should be overwritten if it exists, otherwise false.
- createFolder
- Boolean
true if the folder containing filePath should be created if it does not exist, otherwise false.
Exceptions
filePath is null.
An I/O error occurred (including an error caused by attempting
to overwrite an existing file when overwrite is false).
An access error occurred during file save.
This object has been disposed.
Remarks
This call does not affect the IsDirty, LastSavedTime, and FilePath properties. The FileActionOccurred event is not raised.