|
From: Bert F. <be...@is...> - 2002-09-06 09:59:14
|
On Fri, 6 Sep 2002, Andreas Raab wrote: > That wasn't the problem. What I needed was knowing from within the > *image* what the CWD is. E.g., FileDirectory takes the "default > directory" from the image name (and I am not inclined to change this) > but this means you cannot find out where something like a log file goes. I'm pretty sure OSProcess allows you to query the CWD. It's rather platform-dependent, isn't it? Tim Rowledge wrote: > Err, I am under the impression that the .changes file is to be expected > in the same directory as the .image and the .sources in the same > directory as the VM. Or more exactly, the .sources are expected to be in > the path returned by vmPath and the .changes in the CWD as set by > 'setDefaultDirectoryFrom: Smalltalk imageName'. Right. However, the Unix VM sets vmPath to the *image* directory, just to confuse things. Ian once explained why this is so, but I couldn't quite remember. IMO "vmPath" is just a misnomer and should read "sourcePath", because that's the only actual use for it in the image. Also, let's not confuse "CWD" and "default dir" and "image dir" because it's not the same. CWD is the current directory when you invoke Squeak. Both the VM directory and the image directory can be different from that, and certainly will be in a Squeak-as-scripting-language situation, in which the default dir should probably made equal to the CWD. Or somthing like this ;-) -- Bert |