Remote filesystem operations

QNX Toolkit1.1QNX Toolkit User's GuideDeveloperSetup

The VS Code filesystem Explorer can provide read and write access to target filesystems. With this access, you can perform standard operations such as creating files and folders, and using cut, copy, and paste.

Viewing the filesystem

You can view the contents of remote filesystems in the VS Code workspace before performing any operations with them.

To view the filesystem:

  1. Click the QNX extension icon on the Primary Side Bar to open the QNX menu.
  2. Expand QNX TARGETS.
  3. Click a previously created target.
  4. Click FILESYSTEM. The contents of the filesystem are displayed, including each individual folder:

Mounting the remote filesystem in Explorer

You can mount the remote filesystem in the VS Code workspace. Once mounted, you have read and write access to the target filesystem from within VS Code.

To mount the filesystem:

  1. From QNX TARGETS, right-click the target.
  2. Click Mount QNX Target File System to Workspace.

    The filesystem is mounted, and you can perform file operations.

Performing file operations

From a mounted remote filesystem, you can perform standard file operations on mounted files and remote cloud targets.

Available file operations:

  • New File — add a new file
  • New Folder — add a new folder
  • Refresh Explorer — refresh the remote filesystem
  • Collapse Folders in Explorer — collapse folders

Automated file operations using qnx-shell task

You can use the task.json file to define tasks that copy and move files, such as:

  • Copying files from the current workspace folder to a directory on the default target
  • Copying files from the target to the host
  • Redirecting input, output, or both to the task console

Refer to the Working with tasks section for details on running and configuring tasks, and on setting up automated file transfers to remote targets.

Transferring files using the launch configuration

You can edit the launch.json file to include file transfers as part of launch. To this end, set up your launch configuration to transfer files before or after you run the program that you are developing,

To transfer files:

  1. From the workspace of the project, click on the launch.json file.
  2. Edit the files array to adjust the file transfer settings.

Refer to the Customizing launch configurations section for attributes and variables you can use.

Page updated: