discuss-gnustep
[Top][All Lists]
Advanced

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

Re: case-insensitive file extensions


From: Richard Frith-Macdonald
Subject: Re: case-insensitive file extensions
Date: Sat, 12 Apr 2003 15:35:28 +0100


On Saturday, April 12, 2003, at 12:37  pm, Rob Burns wrote:

In NSWorkspace the methods concerned with selecting icons, and apps for files with a given extension operate as if extensions were case insensitive. There are comments to the effect that they are supposed to be case-insensitive. But, I couldn't find this in the documentation anywhere. My question is, should apps wanting to do checks on a file extension, always assume that they could be getting either a .ZIP file or a .zip file. (because an app that advertises for just .zip files could recieve both) or should NSOpenPanel, gopen, and GWorkspace be providing filenames with only lowercase extensions, as extensions are supposed to be case-insensitive. Currently those three places provide the actual filename, preserving the case of the extension.

The filename the app receives should be the actual file name it is to open ... There may be a file.zip and a file.ZIP and a file.ZiP etc all in the same directory, and the app needs to know
which one it is being asked to open.

The app should therefore do
if ([[name pathExtension] caseInsensitiveCompare: @"zip"] == NSOrderedSame)





reply via email to

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