ITextDocument.SaveCopy 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| SaveCopy(String, Boolean) |
将的内容保存 TextBuffer 到给定的 |
| SaveCopy(String, Boolean, Boolean) |
将的内容保存 TextBuffer 到给定的 |
SaveCopy(String, Boolean)
将的内容保存 TextBuffer 到给定的 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)
参数
- filePath
- String
文件的名称。
- overwrite
- Boolean
如果应覆盖,则为 true filePath ; 否则为false。
例外
filePath 为 null。
发生了 i/o 错误 (包括在为 false 时尝试覆盖现有文件而导致的错误 overwrite) 。
文件保存过程中出现访问错误。
已释放此对象。
注解
此调用不会影响 IsDirty 、 LastSavedTime 和 FilePath 属性。 FileActionOccurred不引发该事件。
适用于
SaveCopy(String, Boolean, Boolean)
将的内容保存 TextBuffer 到给定的 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)
参数
- filePath
- String
文件的名称。
- overwrite
- Boolean
如果应覆盖,则为 true filePath ; 否则为false。
- createFolder
- Boolean
如果包含的文件夹不存在,则为 true filePath ; 否则为false。
例外
filePath 为 null。
发生了 i/o 错误 (包括在为 false 时尝试覆盖现有文件而导致的错误 overwrite) 。
文件保存过程中出现访问错误。
已释放此对象。
注解
此调用不会影响 IsDirty 、 LastSavedTime 和 FilePath 属性。 FileActionOccurred不引发该事件。