std.path.getName(): Screwy by design?

Nick Sabalausky a at a.a
Tue Mar 1 14:37:33 PST 2011


"Daniel Gibson" <metalcaedes at gmail.com> wrote in message 
news:ikj45k$mbh$3 at digitalmars.com...
> Am 01.03.2011 16:38, schrieb Kagamin:
>> Nick Sabalausky Wrote:
>>
>>> or just an extentionless file named ".bashrc"? (I know unix doesn't
>>> typically have a concept of file extension, it's all just part of the 
>>> name,
>>> but unix programs will often care about the extension portion of a
>>> filename.)
>>
>> .Net treats it as a nameless file with extension.
>
> .Net is designed for windows, obviously.
> The right thing to do is to treat a dot at the beginning differently and 
> in all other cases define everything behind the last dot as the extension.
>

Yea, the only time you ever have a "nameless file with an extension" on 
windows is if it's a file that just happens to *be* either ".htaccess" or 
".svn" or something else that's already using it in the unix sense (...or if 
OPTLINK errors out...but I'm not sure that's worth counting ;) ). So I don't 
think it makes any sense to have the windows build of an app handle the 
"name vs extension" semantics any differently then it would handle it on 
unix.




More information about the Digitalmars-d mailing list