Construct new instance of xPCFileStream class


public xPCFileStream(xPCTargetPC tgt, string path, xPCFileMode fmode)


Class: xPCFileStream Class


Namespace: MathWorks.xPCTarget.FrameWork

Syntax Language: C#

public xPCFileStream(xPCTargetPC tgt, string path, xPCFileMode fmode) initializes a new instance of the xPCFileStream class with the path name and creation mode. tgt is a reference to an xPCTargetPC object. path is a relative or absolute path name for the file that the current xPCFileStream object encapsulates. fmode is an xPCFileMode constant that determines how to open or create the file. See xPCFileMode Enumerated Data Type for file mode options.

There are the following limitations:

  • You can have at most eight files open on the target computer at the same time.

  • The largest single file that you can create on the target computer is 4 GB.

  • A fully qualified folder name can have a maximum of 248 characters, including the drive letter, colon, and backslash.

  • A fully qualified file name can have a maximum of 260 characters: The file part can have at most 12 characters: eight for the file name, one for the period, and at most three for the file extension. A file name longer than eight characters is truncated to six characters followed by '~1'.

  • Do not write data to the private folder on your target computer. It is reserved for Simulink® Real-Time™ internal use.




When problem occurs, query xPCException object Reason property.

Introduced in R2009b

Was this topic helpful?