deleteFile
Delete file from device
Description
Examples
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')
Put a file from your host computer onto a ROS device, get it back, and then delete it. Use wildcards to search for all matching files.
Note: You must have a valid ROS device to connect to at the IP address specified in the example.
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 all text files at the specified path onto the ROS device. The destination folder must exist.
putFile(d,'C:/MATLAB/*.txt','/home/user/test_folder')
Get all text files from the ROS device. You can get any files, not just ones added from MATLAB(R). By default, the files are added to the MATLAB current folder.
getFile(d,'/home/user/test_folder/*.txt')
Delete all text files on the ROS device at the specified folder.
deleteFile(d,'/home/user/test_folder/*.txt')
Input Arguments
ROS or ROS 2 device, specified as a rosdevice
or ros2device
object, respectively.
File to delete, specified as a character vector. When you specify the file name, you can use path information and wildcards.
Example: '/home/user/image.jpg'
Example: '/home/user/*.jpg'
Data Types: cell
Version History
Introduced in R2019b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.
Americhe
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- 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)