Edit any file in Navigator

It is possible to use Navigator to look at and edit the contents of just about any file in the IFS.  By default, it is only possible to edit files with extensions that can be edited with Notepad.  Examples are files that end with .log, or .txt.  Other files that cannot by default be edited that would be nice to be able to edit are files that end in .mbr (source file members), or the Apache logs that end with an extension that is a date stamp, or even .php files. This is very easy to set up.

In Navigator, go to File Systems, and find Integrated File System directly underneath.

navedit01

Right click Integrated File System and select Properties from the context menu.

navedit02

In the dialog that appears, under “Enable edit menu option for”, click the “All files” radio button.  Click OK.

Now you can view and edit any file in the IFS.  Just right click the file and select Edit.  But you need to be careful!

The editor is similar to Notepad, if a bit quirky.  You may see some contents that look a little weird.  For example, content encoded CCSID 13488 (UTF-16) will appear to have a space between each character, which makes it tough to read.  Binary files are of course mostly unreadable.  Try not to edit any files that look strange to you.

Also, be aware that some files installed by Zend Server use Linux style End-of-line characters (lf) rather than Windows style (cr-lf).  Editing these files in Navigator (or Notepad, by the way) can make them unusable.  Better to use an editor like Zend Studio or Notepad ++ for these files.  Looking won’t hurt, though, so just don’t make any changes.

It would be very bad to edit binary files, or any configuration files that you are not familiar with.  Proceed with caution.  Never change a file unless you are sure of what you are doing. Always make a back up copy of any file before editing.

This change only affects your installed copy of Navigator, and only for the IFS within the connection.  If you are connected to more than one partition, you will need to make this change for each partition’s connection.

Bookmark the permalink.

Leave a Reply