[Openmcl-devel] Wisdom Regarding File Paths?

R. Matthew Emerson rme at clozure.com
Wed Nov 7 07:59:25 PST 2007


[sorry if you get this twice...]

On Nov 7, 2007, at 1:46 AM, Brent Fulgham wrote:

> So, I have the following questions:
>
> 1.  How can I generate a pathname pointing to the current user's home
> directory (e.g,, "~")

You can use a pathname relative to the home: logical host.

? (probe-file "home:.profile")
#P"/Users/rme/.profile"

Or, use a tilde:

? (probe-file "~")
#P"/Users/rme/"

? (probe-file "~/foo")
#P"/Users/rme/foo"

(tilde expansion was added a few months ago.)

>
> 2.  I assume it is "poor form" to store things in the CCL directory
> (now "/Applications/Clozure CL (Intel-64 Leopard).app/")  So, is there
> a typical set of available paths?

Well, it's not like the app bundle is sacred or anything.  It can be a  
pain to deal with files in it because the Finder treats the .app as a  
unified thing (modulo Show Package Contents, of course).

However, it's not exactly clear yet what should end up in the app  
wrapper.  What about sources?  The interface databases?  Saved  
images?  This stuff still needs to be worked out.

It might be easiest just to pick some place in the home directory, and  
use that.  Maybe set up a logical pathname host for it if that would  
be convenient, e.g.

(setf (logical-pathname-translations "stuff")
     '(("**;*.*.*" "/Users/rme/stuff/")))






More information about the Openmcl-devel mailing list