get fileType of file
Posted: Sun Jan 08, 2012 8:11 pm
Hi all,
I'm working on something where I will want to accept only certain types of file. Namely xml's from a particular creator. But I can't seen to find out what the code is for these files. So if I want to use the "answer file with" command to filter only this file type I have no chance.
So, is there a way I can do a kind of "get fileType of [file]" command to find out what the file type code is?
I don't want to have to load the file (which is potentially very large) only to then use an if statement to determine that it is not the right kind.
Since Snow Leopard Apple have abandoned use of the Creator/Type codes I wonder why RunRev haven't updated Livecode to now accept the standard "with filter" so we can use extension filters instead for OSX? Probably cause its harder to determine if the user is on SL or Lion instead of Leopard or before. But as my app will only be downloadable from the AppStore that won't be an issue!
Thanks in advance
Sean
I'm working on something where I will want to accept only certain types of file. Namely xml's from a particular creator. But I can't seen to find out what the code is for these files. So if I want to use the "answer file with" command to filter only this file type I have no chance.
So, is there a way I can do a kind of "get fileType of [file]" command to find out what the file type code is?
I don't want to have to load the file (which is potentially very large) only to then use an if statement to determine that it is not the right kind.
Since Snow Leopard Apple have abandoned use of the Creator/Type codes I wonder why RunRev haven't updated Livecode to now accept the standard "with filter" so we can use extension filters instead for OSX? Probably cause its harder to determine if the user is on SL or Lion instead of Leopard or before. But as my app will only be downloadable from the AppStore that won't be an issue!
Thanks in advance
Sean