Click or drag to resize

FileInfoCopyTo(String) Method

Copies the specified file to a new file location.

Namespace: Crestron.SimplSharp.CrestronIO
Assembly: SimplSharpHelperInterface (in SimplSharpHelperInterface.dll) Version: 2.21.121
Syntax
C#
public FileInfo CopyTo(
	string destFileName
)

Parameters

destFileName  String
Destination to copy the file to.

Return Value

FileInfo
A FileInfo instance of the newly created file.
Exceptions
ExceptionCondition
InvalidDirectoryLocationExceptionInvalid destination directory passed.
DirectoryNotFoundExceptionThe destination or source directory do not exist.
PathTooLongExceptionThe specified path is greater than 248 characters.
IOExceptionFile system error.
UnauthorizedAccessExceptionAttempt to copy a file to a different drive.
ArgumentExceptionThe argument contains invalid characters.
ArgumentNullExceptionThe argument is null.
NotSupportedExceptionThe system does not support this operation.

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also