n_getls, n_setls, n_putls - File name list manipulation functions

SYNOPSIS

#include "napi3.h"
str *n_getls(SERVER *se,str regexp)
str *n_setls(SERVER *se,str regexp)
str *n_putls(SERVER *se,str *flist)


DESCRIPTION
These functions allow the client software to select the lists of files that will be processed at the server. These lists all refer to files that are resident on the server, not the client.

The n_getls() function performs an ls(1) on the server referenced by the SERVER *se argument, and returns this list into the client's str *. The regexp argument may be a shell type file expression; like "*.txt" for example. The n_putls() function provides a method of directly assigning a list of files to be used by the server. It is very advisable for the calling program to only use the results of calls to n_getls() to obtain the file names passed to n_putls().

The n_setls() function sets the list of selected files on the server referenced by the SERVER *se argument to those described the regexp argument. For example, if you wanted to set the file list to all the files in the /tmp directory, then the following call would be in order: n_setls(se,"/tmp/*"); .

Once the client program assigns a list of files for the server with a call to n_setls(se,"/tmp/*"); or n_putls(), the server will use that list for all subsequent processing.


CAVEATS
The programmer should be aware of Thunderstone's intent to abstract items selected by this family of functions into items that may not be files. An example of this might be something akin to the way that Gopher performs its abstraction.


SEE ALSO
ls(1)


Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.