System::IO::FileInfo::CopyTo method

FileInfo::CopyTo(const String&) method

将当前对象表示的文件复制到指定位置。如果目标文件已存在,复制将失败。

FileInfoPtr System::IO::FileInfo::CopyTo(const String &destFileName)
参数类型描述
destFileNameconst String&目标文件名

ReturnValue

表示副本的 FileInfo 对象

另见

FileInfo::CopyTo(const String&, bool) method

将当前对象表示的文件复制到指定位置。参数指定是否应覆盖已存在的目标文件。

FileInfoPtr System::IO::FileInfo::CopyTo(const String &destFileName, bool overwrite)
参数类型描述
destFileNameconst String&目标文件名
覆盖bool如果应覆盖已存在的目标文件则为 True,若目标文件已存在且复制应失败则为 false

ReturnValue

表示副本的 FileInfo 对象

另见