Use the autocomplete on a FileType, and in addition to the types you’ve defined, you’ll see .All and .AllFileTypes, even though there’s no documentation I can find on .AllFileTypes.
I think that you simply have to check whether f.type <> “” , i.e. that f.type is not empty.
f.type is a readonly property that returns a String. If f.type does not match any of the filetypes that you defined, then the string will be empty. If it is not empty, then you have a match… it must be one of the three types that you defined.
(the MyFileTypes.All returns a string. The string with have the three file types that you defined concatenated, probably with a semi-colon delimiter, eg “myFileType1;myFileType2;myFileType3” if you defined the three with those names. For your stated purposes, you shouldn’t need to use “MyFileTypes.All”.)
[quote=470550:@Craig Hyde]I think that you simply have to check whether f.type <> “” , i.e. that f.type is not empty.
f.type is a readonly property that returns a String. If f.type does not match any of the filetypes that you defined, then the string will be empty. If it is not empty, then you have a match… it must be one of the three types that you defined.[/quote]Ah! Be nice if that was explained better in the LG. Thank you!!
Understood. Any idea what MyFileTypes.AllFileTypes is all about?
I agree that “.allFileTypes” appears as an option during auto-complete, but seems missing from the documentation.
In a quick test, it appears that using .all and .allFileTypes gives the same result.