This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

putFile

Transfer file from host computer to target hardware

Syntax

putFile(mypi,source)
putFile(mypi,source,destination)

Description

putFile(mypi,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 in MATLAB Online™.

example

putFile(mypi,source,destination) copies the file to a destination path and optional file name. This function is not supported in MATLAB Online.

Examples

collapse all

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

collapse all

Connection to a specific 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