Kbase P64590: How to check folder permissions using 4GL
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  09/02/2011 |
|
Status: Verified
GOAL:
How to check folder permissions using 4GL
GOAL:
How to programmatically know if you have write permissions to a certain directory ?
FACT(s) (Environment):
All Supported Operating Systems
Progress/OpenEdge Product Family
FIX:
There is no built-in way to check the folder permission directly from Progress 4GL.
One way is to try to create a file in the directory and see if it succeeds.. If it fails the following error should appear:
** Unable to open file: <file-name>. Errno=<number>. (98)
On Windows, the error message (98) reports the Errno 2:
** Unable to open file: <file-name>. Errno=2. (98)
On Windows platforms, there is another way by using an external programming component (DLL or ActiveX) to see if you have permissions.