User`s guide
Using xpctarget.fs Objects
fs_object.method_name(argument_list)
For example, to get a list of open files for the file system object fsys,
1 Ifyouhavenotalreadydoneso,intheMATLABwindow,typethefollowing
to assign the
xpctarget.fs object to a variable.
fsys=x
pctarget.fs;
2 Type
fsys.filetable
If the file system has open files, a list like the following is displayed:
ans =
Index Handle Flag s FilePos Name
------------------------------------------
0 00060000 R__ 8512 C:\DATA.DAT
1 00080001 R__ 0 C:\DATA1.DAT
2 000A0002 R__ 8512 C:\DATA2.DAT
3 000C0003 R__ 8512 C:\DATA3.DAT
4 001E0001 R__ 0 C:\DATA4.DA
3 The table returns the open file handles in hexadecimal. To convert a handle
to one that other
xpctarget.fs methods, such as fclose, can use, use
the
hex2dec function. For ex ample,
h1 = hex2dec('001E0001'))
h1 =
1966081
4 To close that file, use the xpctarget.fs fclose method. Fo r example,
fsys.fclose(h1);
Getting Information about a File on the Target PC
You can display informatio n for a file on the target PC file sy stem from t he
host PC by using xPC Target m ethods on the host PC for the
xpctarget.fs
object.
9-15