IoHelperSafeMove 方法

安全移动文件到新位置 移动操作可以跨磁盘分区(不同于 File.Move 在同一分区内的重命名操作) 如果目标目录不存在,会自动创建

Definition

命名空间: Suresking.Utility
程序集: Suresking.Utility (在 Suresking.Utility.dll 中) 版本:1.3.22+a27276bb8ffde055e69ff608e98aafba279e1e99
C#
public static ResultStatus SafeMove(
	string sourcePath,
	string destPath,
	bool overwrite = true
)

参数

sourcePath  String
源文件路径(必须存在)
destPath  String
目标文件路径
overwrite  Boolean  (Optional)
如果目标文件已存在是否覆盖,默认为 true

返回值

ResultStatus
包含操作结果的 ResultStatus

参见