PxPlus User Forum

Main Board => Discussions => Programming => Topic started by: James Zukowski on October 02, 2019, 10:48:49 AM

Title: Extended File Info from open Directory
Post by: James Zukowski on October 02, 2019, 10:48:49 AM
I recall seeing (somewhere) a Directory being opened with certain options, and the READ providing more than simply the name. Does anyone know what that might be?
We're currently using RedHat Linux 5.

Thanks!
Title: Re: Extended File Info from open Directory
Post by: michaelgreer on October 02, 2019, 10:52:49 AM
James,

On Linux I frequently do this instead of just opening the directory:

open(hfn)"<ls -l /path/to/dir"

It is then simple to parse out the response.

Michael
Title: Re: Extended File Info from open Directory
Post by: Mike King on October 02, 2019, 10:56:54 AM
James

Add a OPT="+INFO" to get additional information when reading a directory.

For details please see the following documentation (https://manual.pvxplus.com/page/PxPlus%20User%20Guide/File%20Handling/Processing%20Data%20Files/Accessing%20Directory%20Files.htm).