getFile
Description
Examples
Transfer File from SoC Board to Current Folder
Transfer a file from a specified SoC board to the current MATLAB folder on the host computer.
Create a Xilinx® processor hardware object and connect to the processor on-board the Xilinx SoC board.
p = xilinxsoc('192.168.1.101', 'root', 'root');
Use the getFile
function to transfer a file located in the file
path filePath
specified with the file name
exampleFile.txt
to the current MATLAB folder.
getFile(p, "filePath/exampleFile.txt")
The file exampleFile.txt
is now transferred to your current
folder.
Transfer File from SoC Board to a Specified Folder
Transfer a file from a specified SoC board to the specified folder on the host computer.
Create a Xilinx processor hardware object and connect to the processor on-board the Xilinx SoC board.
p = xilinxsoc('192.168.1.101', 'root', 'root');
Use the getFile
function to transfer a file located in the file
path filePath
specified with the file name
exampleFile.txt
to the Documents
folder on your
host computer located in the file path C:/User/
.
getFile(p, "filePath/exampleFile.txt", "C:/User/Documents")
The file exampleFile.txt
is now transferred to your
Documents
folder on your host computer.
Input Arguments
source
— Path and name of file on SoC board
character vector | string scalar
Path and name of file on the SoC board that you want to transfer to your host computer. You can use either the absolute path from the root folder, or the relative path from the your home directory.
Example: "~/exampleFile.txt"
Example: "/home/user/exampleFile.txt"
destination
— Path and name of folder or file on host computer
character vector | string scalar
Path of folder or file on the host computer where you want to transfer the file. If
destination
is the path to a folder, the file is copied inside that
folder with the original file name. If destination
is the path to a
file, the file is copied with the new file name. This function does not create new
folders, so folders in the path must already exist.
If no
destination
is specified, the current MATLAB folder is used.
Example: "C:/User/Documents"
Example: "C:/User/Documents/exampleFileHost.txt"
Version History
Introduced in R2022a
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.
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)