Target computer file information



file_info = fileinfo(filesys_object, file_id) gets file configuration information for the file on the target computer associated with file_id.

Note: The SimulinkRealTime.fileSystem object will be removed in a future release. See the release note for file system commands to use instead. These commands use the SimulinkRealTime.openFTP function and the functions for the MATLAB ftp object.


collapse all

Open file data.dat and read its file information.

tg = slrt;
filesys_object = SimulinkRealTime.fileSystem(tg);
file_id = fopen(filesys_object, 'data.dat', 'r');
fileinfo(filesys_object, file_id)
ans = 

  struct with fields:

               FilePos: 0
         AllocatedSize: 32768
         ClusterChains: 1
    VolumeSerialNumber: -857442364
               FulName: 'C:\data.dat'

Input Arguments

collapse all

File system object created by using the SimulinkRealTime.fileSystem creation function.

The file system object represents the target computer file system. You work with the target computer file system from the development computer by using file system methods.

Example: fsys

Data Types: struct

Pass this value to functions that access files on the target computer.

Example: h

Output Arguments

collapse all

The file information includes the full file name, the amount of space allocated for the file, and technical information for use by a maintenance technician.

Introduced in R2014a