[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Readdir Help



Hello,

As far as I know, readdir() doesn't read in any particular order.  It 
simply retrieves them in the same sequence that they're stored in the 
underlying file system.

If you need them in a particular order, I suggest loading them into an 
array, and sorting the array in whatever sequence you need.  Or using a 
tool like my IFSDIR UDTF to read them.

In case it isn't clear, readdir() is not a part of FTPAPI, it's a part 
of OS/400.  Here's a link to IBMs docs for readdir():
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/apis/readdir.htm


Scott and Kelly wrote:
> I am using FTP_Get to receive multiple files. Then I use OPENDIR and
> READDIR to process the files. It seems that the READDIR starts reading
> the last file written to the directory and then reads the previous
> file, etc until all files are read. I would like to read the first
> file written to the directory then the next one written, etc. Is this
> possible? What criteria does the READDIR use when reading through the
> files?
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------