dir
説明
例
ROS デバイス上にあるフォルダーの内容の表示
ROS デバイスに接続し、フォルダーの内容を一覧表示します。
ROS デバイスに接続します。ROS デバイスのデバイス アドレス、ユーザー名、およびパスワードを指定します。
d = rosdevice('192.168.17.129','user','password');
ROS デバイス上の Catkin ワークスペースのフォルダー リストを取得します。フォルダーを table として表示します。
flist = dir(d,'/home/user/Documents/mw_catkin_ws/');
ftable = struct2table(flist)
ftable=6×4 table
name folder isdir bytes
_____________________ _____________________________________ _____ _____
{'.' } {'/home/user/Documents/mw_catkin_ws'} true 0
{'..' } {'/home/user/Documents/mw_catkin_ws'} true 0
{'.catkin_workspace'} {'/home/user/Documents/mw_catkin_ws'} false 98
{'build' } {'/home/user/Documents/mw_catkin_ws'} true 0
{'devel' } {'/home/user/Documents/mw_catkin_ws'} true 0
{'src' } {'/home/user/Documents/mw_catkin_ws'} true 0
入力引数
device
— ROS または ROS 2 デバイス
rosdevice
オブジェクト | ros2device
オブジェクト
ROS または ROS 2 デバイス。それぞれ rosdevice
オブジェクトまたは ros2device
オブジェクトとして指定します。
folder
— フォルダー名
文字ベクトル
内容を一覧表示するフォルダーの名前。文字ベクトルとして指定します。
出力引数
clist
— 内容のリスト
構造体
内容のリスト。構造体として返されます。この構造体には次のフィールドが含まれます。
name
— ファイル名 (char
)folder
— 絶対パス (char
)bytes
— ファイルのサイズ (バイト単位) (double
)isdir
—name
がフォルダーかどうかのインジケーター (logical
)
バージョン履歴
R2019b で導入
参考
rosdevice
| ros2device
| putFile
| getFile
| deleteFile
| openShell
| system
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)