emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how having the basename of a file or directory


From: Thierry Volpiatto
Subject: Re: how having the basename of a file or directory
Date: Mon, 31 Jan 2011 13:19:37 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2.92 (gnu/linux)

Andreas Schwab <address@hidden> writes:

> Thierry Volpiatto <address@hidden> writes:
>
>> Andreas Schwab <address@hidden> writes:
>>
>>> Thierry Volpiatto <address@hidden> writes:
>>>
>>>> (file-name-nondirectory "path/to/a/directory")
>>>> should return ==> directory
>>>
>>> It does.
>> Not really.
>> It does if PATH doesn't end with "/" otherwise no, it's why
>
> file-name-nondirectory doesn't care whether the argument is a directory
> or not, it looks only at the contents of the string.
Yes, i understood that, i am just pointing out that we should not have
to take care if string end with / or not, like shell command basename.

basename /home/thierry/riri
riri
basename /home/thierry/riri/
riri

-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]