dir
장치의 폴더 내용 나열
설명
예제
ROS 장치의 폴더 내용 보기
ROS 장치에 연결하고 폴더의 내용을 나열합니다.
ROS 장치에 연결합니다. ROS 장치의 장치 주소, 사용자 이름, 비밀번호를 지정합니다.
d = rosdevice('192.168.17.129','user','password');
ROS 장치에서 Catkin 작업 공간의 폴더 목록을 가져옵니다. 폴더를 테이블로 봅니다.
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 명령 창에 입력하십시오. 웹 브라우저는 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)