all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Please confirm this file-name-directory behavior
Date: Mon, 17 Sep 2007 06:04:31 +0200	[thread overview]
Message-ID: <uy7f60wfk.fsf@gnu.org> (raw)
In-Reply-To: <1189997172.468026.325500@g4g2000hsf.googlegroups.com> (message from Mirko on Mon, 17 Sep 2007 02:46:12 -0000)

> From: Mirko <mvukovic@nycap.rr.com>
> Date: Mon, 17 Sep 2007 02:46:12 -0000
> 
> Continuing, what is the expected behavior if the argument does not end
> in a slash, like
> 
> (file-name-directory "~/foo/bar/") vs (file-name-directory "~/foo/
> bar")
> 
> On windows, the first  form returns the full argument, while the
> second "~/foo/".  Is that the expected behavior?

Yes.

The ELisp manual says (in the node that describes
file-name-directory):

       On most systems, the directory part is everything up to and including
    the last slash (backslash is also allowed in input on MS-DOS or
    MS-Windows); the nondirectory part is the rest.

So if the file name ends with a slash, it's treated as a directory.

      reply	other threads:[~2007-09-17  4:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-14 14:31 Please confirm this file-name-directory behavior Mirko
2007-09-14 15:01 ` Sven Joachim
2007-09-14 15:33 ` Eli Zaretskii
     [not found] ` <mailman.873.1189784002.18990.help-gnu-emacs@gnu.org>
2007-09-15  1:26   ` Barry Margolin
2007-09-17  2:46     ` Mirko
2007-09-17  4:04       ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uy7f60wfk.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.