Documentation

xPCFileInfo.CopyToHost

Copy file from target computer file system to development computer file system

Syntax

public FileInfo CopyToHost(string DevelDestFileName)

Description

Class: xPCFileInfo Class

Method

Namespace: MathWorks.xPCTarget.FrameWork

Syntax Language: C#

public FileInfo CopyToHost(string DevelDestFileName) copies file, DevelDestFileName, from target computer file system to new location on development computer file system. DevelDestFileName is a character string that specifies the full path name for the file.

Exception

ExceptionCondition

ArgumentException

DevelDestFileName is empty, contains only white spaces, or contains invalid characters.

ArgumentNullException

DevelDestFileName is NULL reference.

NotSupportedException

DevelDestFileName contains a colon (:) in the middle of the character string.

PathTooLongException

The specified path, file name, or both in DevelDestFileName exceed the system-defined maximum length. For example, on Windows® platforms, path names must be fewer than 248 characters. File names must be fewer than 260 characters.

SecurityException

Caller does not have required permission.

UnauthorizedAccessException

System does not allow access to DevelDestFileName.

xPCException

When problem occurs, query xPCException object Reason property.

Introduced in R2011b

Was this topic helpful?