[Newbies] Re: Squeak equivalent for Filename

David T. Lewis lewis at mail.msen.com
Sun Dec 23 19:02:36 UTC 2007

On Sun, Dec 23, 2007 at 10:31:37AM -0800, Doug Edmunds wrote:
> Frank Urbach wrote:
> > >
> > > to use the FileDirectory you have to use the full pathname on your
> system e.g. C:\temp.
> How then do I find out what the full pathname
> is of the current directory (the equivalent to '.')?

"FileDirectory default pathName" will give you the path to the
default directory that is being used by Squeak. The actual directory
is "FileDirectory default".  And of course this is the same thing as
"FileDirectory on: FileDirectory default pathName".

The default Squeak directory is actually not the same thing as "." at
all. Different operating systems and file systems have different notions
of what "current directory" means. For example, on Windows, the default
current working directory is different for each individual volume
(C:, D:, etc), and to evaluate a relative path name you would need
to know both current volume and a current working directory for that
volume. Since other operating systems (e.g. Unix) do not use the
concept of different volumes, supporting this sort of thing within
Squeak could get messy in a hurry.

For that reason, Squeak basically just ignores the issue and uses
its own default, which may or may not happen to be the same as
"." depending on how Squeak is installed and what OS you are using.
The concept of a default Squeak directory is generic enough to
make sense on most operating systems, and serves well enough for
most purposes.


More information about the Beginners mailing list