Thomson
Thomson

Reputation: 21615

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.

Upvotes: 1

Views: 808

Answers (1)

leppie
leppie

Reputation: 117220

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"
>

Upvotes: 2

Related Questions