std.path.getName(): Screwy by design?
Kagamin
spam at here.lot
Thu Mar 3 09:03:59 PST 2011
Nick Sabalausky Wrote:
> "Kagamin" <spam at here.lot> wrote in message
> news:iklanl$1qg$1 at digitalmars.com...
> > Nick Sabalausky Wrote:
> >
> >> Name one case in windows where some sort of distinction between filename
> >> and
> >> extension actually makes a real tangible difference versus unix, that
> >> doesn't merely amount to convention
> >
> > You can pass program path to CreateProcess without extension, .exe is
> > assumed.
>
> I really don't think that indicates that Windows doesn't consider extension
> part of the filename. It just expects the filename to have an extension for
> certain file types. It's basically just a shortcut for:
>
> if(tryingToRunAProgram && !hasExt(filename))
> filenameRegex = filename~"\.(exe|com|bat)";
This indicates that windows is quite smart regarding extensions.
More information about the Digitalmars-d
mailing list