|
Use the lstat() function. Open the directory - opendir() Read the directory - readdir() determine the name of the IFS object from the readdir() data structure (I use d_name here) get the attributes - lstat() This returns a data structure of attributes - like what you see with wrklnk. ex: eval returnDir = opendir(%addr(dirName)) eval p_entry = readdir(returnDir) eval entryPath = %trim(dirName) + '/' + %trim(d_name) eval ri = lstat(%addr(entryPath) : %addr(statDS)) There is good IBM documentation with the UNIX api's. Just no examples. hth. Phil --- Gurrieri Fabrizio <fabrizio.gurrieri@bartolini.it> wrote: > > How can I retrieve the attributes of a file in the > IFS by an RPGLE > program??? > > I've try with 'readdir()' but it returns obly the > name and lenght's name of > the file instead I need to check attribute such as > data, type and size. > > > Thanks a lot. > > > Fabrizio > (ITALY) > +--- > | This is the RPG/400 Mailing List! > | To submit a new message, send your mail to > RPG400-L@midrange.com. > | To subscribe to this list send email to > RPG400-L-SUB@midrange.com. > | To unsubscribe from this list send email to > RPG400-L-UNSUB@midrange.com. > | Questions should be directed to the list > owner/operator: david@midrange.com > +--- __________________________________________________ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/ +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.