It is necessary to learn tech. OS (to set the work path). How to do it?
|
1 answer
methods for determining the platform are set forth, for example, in the documentation .
an example using the apr library, in particular, the apr.platform_get () function, which can return one of the strings — UNIX , WIN32 , OS2 , or OS2 :
apr = require ("apr") print (apr.platform_get()) |
os.capture 'uname'for linux / mac: if an error, then windows. On SO there are some tips - approximatenumber