schemeironscheme

What is the current directory for loading source file in IronScheme?


Is there any similar command such as cd, pwd which operate on current working directory in IronScheme? I want to get the directory which is used by (load "source.ss").

Besides, since IronScheme is a standard Scheme, I think the function works in other Scheme could also work here.


Solution

  • This is a not standard Scheme procedure, but in IronScheme you can do (one of) the following:

    > (import (ironscheme environment))
    > (current-directory) ; same as the present working dir
    "C:\\Program Files\\IronScheme"
    > (application-directory) ; where the IronScheme exe lives
    "C:\\Program Files\\IronScheme"
    >