Re: Not getting filetype info from FSGetcatlogInfo() function
Re: Not getting filetype info from FSGetcatlogInfo() function
- Subject: Re: Not getting filetype info from FSGetcatlogInfo() function
- From: Matt Gough <email@hidden>
- Date: Fri, 6 Jan 2006 12:28:14 +0000
On 6 Jan 2006, at 11:33, Elango C wrote:
Yes I am not getting "filetype" and "filecreator" for most of the
files, but "FinderFlags" field () is getting filled for all the files;
But for the bitmap or Appilcaitons it should give ".BMP" and "APPL"
right?
Do we have any other way to get these file types from the FS manager?
I think you have a misconception:
1. Files with a .bmp will not automatically get a file type of
'.BMP'. They will only have that if some app has explicitly set a
file type. So, if you get one from the internet or a Windows machine,
it won't have one automatically. In the pre- OS X days, the OS (and
Quicktime) would do this mapping automatically for you, but I don't
think they do anymore.
2. Most applications nowadays nowadays are distributed as packages,
and as such are just directories as far as the file system is
concerned. As such, they don't have a fileType.
You should investigate using LaunchServices (see LSInfo.h -
LSCopyItemInfoForRef), and if you are on 10.4, UTIs are the 'correct'
way nowadays of determining individual file types. However, I suspect
in your case you just care if a file has a .bmp extension. You are
unlikely to get a bmp file on a mac without the extension but with
one of the old mapped file types instead.
Matt
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden