Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>sr-srcf-mirrorNew to Visual Studio Code? Get it now.
sr-srcf-mirror

sr-srcf-mirror

Steve Richter

|
876 installs
| (0) | Free
mirror xxx i eee folder on PC
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

sr-srcf-mirror. Steve Richter vscode extension. Version 1.0.23.

Mirror IBM i Source File members onto this PC.

Features

Mirrors IBM i source members onto the file system of the PC running this extension.

A json file named '.ifs-mirror.json' is placed in a PC directory. The 'ifsFolder' property of this json file specifies the name of the IBM i IFS folder which is to be mirrored into the PC folder that contains the .json file. Other properties in the .json file specify names of files and folders to be ignored ( not mirrored ), whether mirroring of the IFS folder should be halted, etc.

Mirroring starts when a project is opened. Files are copied from the IFS which do not exist on the PC and which have a modified time that does not match that of the PC file. Text documents edited and saved in the VSCODE editor are copied up to the IFS folder after VSCODE saves the text document.

adding new source members

To add a new source member, add a new file to the srcmbr mirrored folder of the project. The extension will prompt for entry of source member name, SRCTYPE and text description of the new source member. Once entered the member is added to the IBM i source file.

activity log

To see the log which lists names of IFS files and folders mirrored between the IBM i IFS and PC file system, click the output tab and then select "ifs-mirror" from drop down list of output logs.

.srcf-mirror.json file

Place a file named .srcf-mirror.json in a PC folder in order to mirror the source members specified in the .json file down to the PC folder.

The .json file contains properties for library, srcFiles, srcTypes and members. Use those properties to specify which source members are to be mirrored down to the PC.

rpg srcmbr compile time array start

  • The text lines of RPG and DDS source members are shifted to the left by 5 characters when they are mirrored down from the IBM i server.
  • see the set_compileTimeArrayStart command. The rpg_ibmi extension runs this command when it detects that the line number of the text line that marks the start of compile time array in the rpg srcmbr has been changed. The command is run in this srcf-mirror extension to store that changed line number. When the srcmbr is saved and uploaded to the ibm i, the new line number location is used when updating the source on the ibm i.

change source member srctype and text description

  • prompted to change srctype and text desc in create object prompt
  • webview sends ext_srcmbr_updateAttr message to extension
  • extension runs as400_chgpfm function of the ibmi_common package

jsdoc formatted comment used to store srctype, text desc, other source member attributes

Type jsdoc, then press tab to insert a jsdoc formatted comment in the text of the source file. When the source file is saved, the mirrored source member on the ibm i will be updated with the srctype and text description specified in the optional jsdoc formatted comment.

commands

  • srcfMirror_workspaceRootFolders - command called from another extension to get list of srcf-mirror root folders.

onDidMirrorDown

onDidMirrorDown command is intended to be used by an ibmi language extension. Call the command and pass in a callback function. When a source member is mirrored down from ibm i to the PC, the srcf-mirror extension will call all of the callback functions after the srcmbr mirror function is completed. The argument passed to the callback function is the path of the srcmbr file.

messageToSrcfMirror

messageToSrcfMirror command is run by other extensions to send a message to srcf-mirror extension. ready message is sent when an extension, like the rpgi language extension, has completed activation. At that point srcf-mirror can now start to mirror srcmbrs from ibm i to the PC. The reason for the wait is because srcf-mirror sends the onMirrorDown message when a new srcmbr file has been created. The language extensions have to be ready to parse a source member after it is created.

( probably not the best way to do this. Should have a json object in common settings area instead. A queue of files downloaded by srcf-mirror which are ready to be parsed by rpgi extension. )

Requirements

If you have any requirements or dependencies, add a section describing those and how to install and configure them.

Extension Settings

Include if your extension adds any VS Code settings through the contributes.configuration extension point.

For example:

This extension contributes the following settings in the IBM i IFS Mirror section:

  • sr_ifs_mirror.mirror_hold: Halt mirroring of all IFS folders mirrored by this extension.

Known Issues

Calling out known issues can help limit users opening duplicate issues against your extension.

Release Notes

Users appreciate release notes as you update your extension.

1.0.0

Initial release of ...

1.0.1

Fixed issue #.

1.1.0

Added features X, Y, and Z.


Working with Markdown

Note: You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:

  • Split the editor (Cmd+\ on macOS or Ctrl+\ on Windows and Linux)
  • Toggle preview (Shift+CMD+V on macOS or Shift+Ctrl+V on Windows and Linux)
  • Press Ctrl+Space (Windows, Linux) or Cmd+Space (macOS) to see a list of Markdown snippets

For more information

  • Visual Studio Code's Markdown Support
  • Markdown Syntax Reference

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft