Download MATLAB XPC TARGET 4 - API GUIDE User`s guide

Transcript
dir
Purpose
Syntax
14dir
List contents of current directory on target PC
MATLAB command line
dir(file_obj)
Arguments
file_obj
Description
Method of xpctarget.fsbase, xpctarget.ftp, and xpctarget.fs objects.
From the host PC, lists the contents of the current directory on the target PC.
Name of the xpctarget.ftp or xpctarget.fs
object.
To get the results in an M-by-1 structure, use a syntax like
ans=dir(file_obj). This syntax returns a structure like the following:
ans =
1x5 struct array with fields:
name
date
time
bytes
isdir
where
• name — Name of an object in the directory, shown as a cell array. The name,
stored in the first element of the cell array, can have up to eight characters.
The three-character file extension is stored in the second element of the cell
array.
• date — Date of the last save of that object
• time — Time of the last save of that object
• bytes — Size in bytes of that object
• isdir — Logical value indicating that the object is (1) or is not (0) a directory
Examples
List the contents of the current directory for the file system object fsys. You
can also list the contents of the current directory for the FTP object f.
dir(fsys) or dir(f)
4/12/1998
20:00
222390
IO
SYS
14-17