[Openmcl-devel] Wisdom Regarding File Paths?
rudi at constantly.at
Wed Nov 7 17:37:36 PST 2007
-----BEGIN PGP SIGNED MESSAGE-----
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")
> Or, use a tilde:
> ? (probe-file "~")
If you want to stay portable, use the function user-homedir-pathname:
(merge-pathnames ".profile" (user-homedir-pathname))
>> 2. I assume it is "poor form" to store things in the CCL directory
>> (now "/Applications/Clozure CL (Intel-64 Leopard).app/") So, is
>> 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/.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
-----END PGP SIGNATURE-----
More information about the Openmcl-devel