Invoking Treeview

The usual way of invoking Treeview from the command line is to type

   treeview name name ...
where the names are descriptions of items you want to display. These will normally be file or directory names, but may be something else like an HDS path or XPath expression (the latter is not implemented yet...). If only one name is specified on the command line it will be opened automatically, but if several are given they will initially appear closed.

Although Treeview itself does not understand wild cards, your shell probably does, so in most environments doing something like

   treeview *.sdf
will open Treeview with all the HDS container files in the current directory displayed.

Alternatively you can just type

   treeview
which will display all the items in your current directory.

Text mode

Treeview can run in text mode as well as in its normal graphical window. If you invoke it with the -text flag, then instead of displaying its usual window, it will give you a text dump of the indicated items down to their full depth. This can be useful for a quick look into structured files. Here is the result of doing this in a directory which contains a couple of FITS files:

   treeview -text *.fits
   + [FIT] cube.fits
     - [IMG] Primary HDU  (Image (120,120,8,1) )
   + [FIT] tables.fits
     - [IMG] Primary HDU  (Image)
     - [TBL] HDU 1  ASCII table (13x138)
     - [TBL] HDU 2  Binary table (3x881)
You can see a more impressive example if you do:
   treeview -demo -text

In combination with -text, the -path flag appends to each line the full path in the tree of each node output.

Other flags

You can use the -D and -X flags with the treeview script to pass flags directly to the java command (the JVM). The most common use for this is to increase the amount of memory available to treeview using the -Xmx flag. The following invocation will start up treeview with 256 Megabytes available instead of the default amount (probably 64Mb):

   treeview -Xmx256M
You should do something like this if you are experiencing java.lang.OutOfMemoryErrors when treeview is running.

Treeview has a number of other command line flags which are mostly concerned with forcing nodes to be interpreted in a particular way. These are intended mainly for debugging purposes, but you can see a usage synopsis by doing

   treeview -help