opendir() - It returns list of files or the file count - Which is it?

Kenneth Brody kenbrody at bestweb.net
Sun Sep 2 21:26:55 PDT 2007


Quoting fp (Sun, 02 Sep 2007 20:38:02 -0700):
[...]
> Reading the F9 help no much information is given.  I went to online
> help and just about the same.  The online help, however, gives me
> mixed signals.
>
> N = opendir("PRC_MASK")
> Creates a list of all prc files for the current file.
>
> While the lower paragraph on the same page it says
>
> Description:
> OPENDIR() allows you to do the equivalent of a DOS "DIR" or UNIX   
> "ls" command.
> It returns the number of files in a filePro directory that meet the criteria.

I see no "mixed signals" here.  The first instance doesn't say it returns
the list, but rather "creates a list".  It returns the number of files in
that list.

[...]
> That said, how do I get opendir() to give me the "list of files" and not
> "the number of files"?

opendir() doesn't give you the list.  It creates the list and returns
the size of that list.

To get the list itself, either iterate through using nextdir(), or use
the @DIRLIST_*[] system arrays.

-- 
KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com


More information about the Filepro-list mailing list