%% Put, Get, and Delete Files on ROS Device
% Put a file from your host computer onto a ROS device, get it back, and then delete it.
% Connect to a ROS device. Specify the device address, user name, and password of your ROS device.

d = rosdevice('192.168.17.128','user','password');

%
% Put a new text file that is in the MATLAB(R) current folder onto the ROS device. The destination folder must exist.

putFile(d,'test_file.txt','/home/user/test_folder')

%
% Get a text file from the ROS device. You can get any file, not just ones added from MATLAB(R). By default, the file is added to the MATLAB current folder.

getFile(d,'/home/user/test_folder/test_file.txt')

%
% Delete the text file on the ROS device.

deleteFile(d,'/home/user/test_folder/test_file.txt')

% Copyright 2019 The MathWorks, Inc.