Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

CL_GUI_FRONTEND_SERVICES=>DIRECTORY_EXISTS does this work for all OS automatically?

Hi SAP experts,

I would like to ask for an advice on using DIRECTORY EXISTS static method from CL_GUI_FRONTEND_SERVICE class.

I am trying to create a generic file validator that iterates to all directories given the path from user's file system. However, i am concerned with the user's OS, what if the user is using a different OS such as Linux or Solaris? if i am not mistaken, i believe they use slash (/) instead of backslash(\).

Will this be able to get accommodated by DIRECTORY EXISTS?

Thanks and warmest regards,


Former Member

Hi Ryann,

You can use CL_GUI_FRONTEND_SERVICES=>GET_FILE_SEPARATOR to get the separator as per the Operating system.



1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question