putFile - Transfer file from host computer to target hardware - MATLAB (original) (raw)
Main Content
Transfer file from host computer to target hardware
Syntax
Description
putFile([mypi](#bt548g0-1%5F1%5Fsep%5Fshared-mypi),[source](#bt548g0-1%5F1-source))
copies the specified file from the MATLAB® Current Folder to the current folder (pwd
) on the Raspberry Pi® hardware. Wildcards are supported. This function is not supported inMATLAB Online™.
putFile([mypi](#bt548g0-1%5F1%5Fsep%5Fshared-mypi),[source](#bt548g0-1%5F1-source),[destination](#bt548g0-1%5F1-destination))
copies the file to a destination path and optional file name. This function is not supported in MATLAB Online.
Examples
You can copy a file, such as out.jpg
, from your host computer to the Raspberry Pi hardware. Use the different file and path conventions of each operating system.
putFile(mypi,'C:\Work.profile','/home/pi/.profile')
Input Arguments
Connection to the Raspberry Pi hardware board, specified as a raspi object.
Path and name of the file on the host computer. Specify the path as a string. You can use an absolute path or a relative path from the MATLAB Current Folder. Use the path and file naming conventions of the operating system on your host computer.
Example: 'C:\Work\.profile'
Data Types: char
Destination folder path and optional file name, specified as a string. Use the Linux® path and file naming conventions. Optional.
Example: '/home/pi/.profile'
Data Types: char