[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: IFS folder listing
The program returns a directory listing. The directory listing contains
. and .. because those are in the directory.
If you don't need them simply ignore them.
C Dow p_entry <> *NULL
C Eval wFileName =
C %subst(wdEntry.d_name:1:wdEntry.d_nameLen)
* Don't include directory values
C If wFileName <> '.' and
C wFileName <> '..'
C Endif
C Eval p_entry = readdir(dirh)
C Enddo
-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Mohamed
Musthafa Safarulla
Sent: Friday, January 15, 2010 9:29 AM
To: HTTPAPI and FTPAPI Projects
Subject: Re: IFS folder listing
Thanks Rick but why do we really need that . and ..?
Thanks,
Musthafa
On Thu, Jan 14, 2010 at 4:58 PM, Rick Connor <rconnor@xxxxxxxxxxxxx>
wrote:
> There are two "special" entries inside each directory, as well. They
are
> "." (a single dot) and ".." (two dots). These
> signify the "current directory" and the "parent directory"
respectively.
>
> -----Original Message-----
> From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Mohamed
> Musthafa Safarulla
> Sent: Thursday, January 14, 2010 5:29 PM
> To: HTTPAPI and FTPAPI Projects
> Subject: IFS folder listing
>
> I want directory listing of an IFS folder , I got the sample program
> from
>
> http://www.scottklement.com/rpg/ifs_ebook/ifs_ebook.pdf page 81
>
> The program is like
>
> dir = OpenDir('/customer');
> p_dirent = readdir(dir);
> Dow p_dirent <> *NULL;
> Msg = %subst(d_name:1:d_namelen);
> p_dirent = readdir(dir);
> EndDo;
> CloseDir(dir);
> *InLR = *On;
>
> The file listing is coming perfect but i have extra entries in the
> listing
> like
> "." and ".."
>
> No idea, what it is. Any pointers? Please
>
> --
> Thanks,
> Musthafa
>
-----------------------------------------------------------------------
> This is the FTPAPI mailing list. To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
>
-----------------------------------------------------------------------
>
--
Thanks,
Musthafa
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------