rzr
Member
Is there an easier / alternate way to check if user has write permission on a file?
Here's what I'm doing now. I load the ls -lrt result into cResult and parse it to check permissions.
Here's what I'm doing now. I load the ls -lrt result into cResult and parse it to check permissions.
Code:
DEFINE VARIABLE cOSCommand AS CHARACTER NO-UNDO.
DEFINE VARIABLE cResult AS CHARACTER NO-UNDO.
cOSCommand = 'ls -lrt /home/rzr/test.txt'.
INPUT THROUGH VALUE(cOSCommand).
IMPORT UNFORMATTED cResult.
INPUT CLOSE.