www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: std.path.getName(): Screwy by design?

reply Kagamin <spam here.lot> writes:
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.
Mar 02 2011
parent reply "Nick Sabalausky" <a a.a> writes:
"Kagamin" <spam here.lot> wrote in message 
news:iklanl$1qg$1 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)";
Mar 02 2011
parent Kagamin <spam here.lot> writes:
Nick Sabalausky Wrote:

 "Kagamin" <spam here.lot> wrote in message 
 news:iklanl$1qg$1 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.
Mar 03 2011