OS-APPEND, OS-COMMAND, OS-COPY, OS-CREATE-DIR & OS-DELETE as FUNCTIONs - OpenEdge Development - Products Enhancements - Progress Community

 OpenEdge Development

OS-APPEND, OS-COMMAND, OS-COPY, OS-CREATE-DIR & OS-DELETE as FUNCTIONs

  • Under Review

OS-APPEND, OS-COMMAND, OS-COPY, OS-CREATE-DIR & OS-DELETE take literal constants as parameters.

e.g. OS-COPY c:\temp\1.txt c:\temp2.txt.

To send parameters as variables you have to use the VALUE keyword:

e.g. OS-COPY VALUE(vFile1) VALUE(vFile2).

This proposal is to also allow OS-DELETE to be called as a FUNCTION.

e.g. OS-DELETE(vFile1, vFile2).

The same principle to be applied to the other "OS*" statements.

Comments
  • Maybe it would be even better to have new classes for these purposes such as Progress.Util.FileUtil that would have methods like CopyFile, DeleteFile, CreateDirectory etc.