User`s guide
Using xpctarget.fs Objects
7-15
Getting Information about a File on the Target PC
You can display information for a file on the target PC file system from the host
PC by using xPC Target methods on the host PC for the
xpctarget.fs object.
Use the method syntax to run an
xpctarget.fs object method. The syntax
method_name(fs_object, argument_list) can be replaced with
fs_object.method_name(argument_list)
For example, to display the information for the file identifier fid1,
1 If you have not already done so, in the MATLAB window, type the following
to assign the
xpctarget.fs object to a variable.
fsys=xpctarget.fs;
2 Type
fid1=fsys.fopen('data.dat');
This opens the file data.dat for reading and assigns the file identifier to
fid1.
3 Type
fsys.fileinfo(fid1);
This returns disk information like the following for the C:\ drive file system.
ans =
FilePos: 0
AllocatedSize: 12288
ClusterChains: 1
VolumeSerialNumber: 1.0450e+009
FullName: 'C:\DATA.DAT'
Getting Information about a Disk on the Target PC
You can display information for a disk on the target PC file system from the
host PC by using xPC Target methods on the host PC for the
xpctarget.fs
object.