Re: Identifying the file types
Re: Identifying the file types
- Subject: Re: Identifying the file types
- From: Emmanuel <email@hidden>
- Date: Mon, 26 Jan 2004 17:23:02 +0100
At 11:33 PM +0800 26/01/04, Takashi Yoshida wrote:
>
Hi all,
>
>
I'm writing a simple drag and drop application that will begin a
>
slideshow of the photographs.
>
User is supposed to drag a folder containing photos or selections of
>
photo files into the application and the application will launch
>
GraphicConverter to begin the slideshow.
>
>
It's simple enough and I've already got it to work. The thing is, is
>
there any reliable way to check whether the files dropped into the
>
application are pictures? File extension is not really a reliable way
>
to correctly identify the file types and I'm not sure if checking the
>
file types or creator type are reliable (do Mac OS X applications still
>
keep these information around?)
File types are still reliable, except sometimes they may be missing, and you've an extension instead, that you read easily (Finder has a specific property for that).
Otherwise, I would just ask "Image Capture Scripting.app" what it would think of opening the file and telling me its size. If if returns a reasonable size, then I would be pretty sure the file is a picture.
It's little known and little used I think, but Image Capture Scripting.app is in the standard install.
Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.