download_file

Download file from the Moku file system to local machine

User can download files from bitstreams, logs, ssd, media and persist directories. If using the REST API directly, these directories form the group name in the URL and the filename follows the download command; e.g. /api/persist/download/<filename>. No Client Key is required (ownership doesn't need to be taken).

When using either of the clients, user can access this function directly from instrument reference.

Log files downloaded from persist (Moku:Go), media (Moku:Lab) or ssd (Moku:Pro) will be in *.li format, which can then be converted to *.csv, *.mat, or *.npy using LI File Converter.

If you experience issues converting log files with the MATLAB API, please use download_file2 method with the same parameters.

Parameters

string required
Target directory to access
allowed values:bitstreams, logs, persist, ssd, media
string required
Name of the file to download
string required
Local path to download the file

Caution

local_path should always be a absolute path with file name. For example, in Python instead of passing it as "/user/home" or "./home" pass it as "/user/home/sample.txt"

Usage in clients,