| 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 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:
BooleanTrue if the copy completes without raising an exception and the source file exists at the path specified
See Also