Filename Specifications

Each of the functions that operate on files needs a specification to identify the correct file (or URL). The functions are:

You can specify a filename as:

Local

The following example instructs the program to open a file on the same machine as the application server in the current working directory for a file called myfile.txt.

	ll = list_open("a myfile.txt",100);

To open a file on the same machine, but different directory, simply specify the full directory path.

Display

In some cases you want to open or modify a file on the machine that is displaying the application, which can be running either fat (where the server machine is already acting as "display") or thin client. In the situation where the file is on the display machine, you prefix the filename with the specifier gui!:

	ll = list_open("a gui!myfile.txt",100);
If the filename contains wildcard characters, then the Display's File Open/Save dialog will open:
        ll = list_open("gui!*.txt",100);

gui! has five subspecifiers:

Database

If the file to manipulate is located on a machine other than the local, or display, machine use vortex! to specify the file, which can be located where a VORTEXserver database connection has been made or simply where the VORTEXserver file copy program runs. In this example, list_open() uses the Oracle database connection to fetch the file located on the machine specified as dbmachine.

	{
	connect(0,"net:scott/tiger@dbmachine!VTX0");
	ll = list_open("a vortex!myfile.txt",100);
	.
	.
	.
	}

Retrieving a file from the machine that runs the VORTEXserver file copy program might look like this:

	{
	connect(0,"net:whatever@filemachine!vtxhost.fcp");
	ll = list_open("a vortex!myfile.txt",100);
	.
	.
	.
	}

Again, you can specify as much directory path information as necessary to find the file.

Internet

To access files through HTTP or FTP, you use the net! prefix and specify type as either http or ftp. Note that you cannot update any files with this prefix. It is read only. The following example accesses the file myfile.txt located on an FTP server:

 	ll = list_open("a net!ftp://ftp.trifox.com/pub/outgoing/myfile.txt",100);

You can also access HTTP servers with

	ll = list_open("a net!http://www.trifox.com/myfile.txt",100);

Directory

The read-only directory specification lets you specify a directory and filename mask and get all the qualifying entries. Use the syntax

	dir![-rfd] pathname

where

r	scans directories recursively. Used alone it assumes rf.
f	returns only filenames (default, if you don't specify another option)
d	returns only directory names.

When you specify any option, be sure to put a blank space before pathname. The following example returns all files with an .a extension that are located in the directory /usr or any of its subdirectories.

	LL = list_open("dir! -rf /usr/*.a", 1000);

Clipboard

This references the DesignVision internal clipboard. The internal clipboard is a memory area that is managed by the clipboard() functions.