Click or drag to resize

DiskUtilitiesTryCopyFile Method (FileInfo, DirectoryInfo)

Attempts to copy a file into another directory.

Namespace:  DustProductions.Core
Assembly:  DustProductions.Core (in DustProductions.Core.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public static bool TryCopyFile(
	FileInfo sourceFileInfo,
	DirectoryInfo targetInfo
)

Parameters

sourceFileInfo
Type: System.IOFileInfo
A FileInfo for the file you want to copy
targetInfo
Type: System.IODirectoryInfo
A DirectoryInfo for the directory you want the file to be in after copying (the directory will be created if it doesn't exist)

Return Value

Type: Boolean
True if the copy completes without raising an exception and the source file exists at the path specified
See Also