[Openmcl-devel] Wisdom Regarding File Paths?

Rudi Schlatte rudi at constantly.at
Wed Nov 7 17:37:36 PST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On 07.11.2007, at 23:59, R. Matthew Emerson wrote:

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

If you want to stay portable, use the function user-homedir-pathname:

(merge-pathnames ".profile" (user-homedir-pathname))
#P"/Users/rudi/.profile"

>>
>> 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).

Right.  Also, things might break for users running CCL on an account  
without admin rights.  (I do this for exactly that reason: so that  
some random program can't go and write things below /Applications or / 
System/Library without asking for an admin password.)

If I am not mistaken, on OS X applications are supposed to dump their  
support files below ~/Library/Application Support/<Application  
Name>/.  On Unix, the customary thing is to create a hidden directory  
in the user's home directory, a la ~/.emacs.d/.

Cheers,

Rudi

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iD8DBQFHMmhh765FppppCGcRAs9PAKC7ukWrUFUSC1cw4BvjNUCauixwRgCgpiT6
h+50pZ65NVM3rw1xfMcVMkM=
=Y2+Z
-----END PGP SIGNATURE-----



More information about the Openmcl-devel mailing list