Way to retrieve creator-type of OS X files?
Robert Brenstein
rjb at rz.uni-potsdam.de
Thu Sep 16 15:36:09 EDT 2004
>>But it can't be extended to get the finder label, for example.
>
>True. I was merely offering an immediate solution for the original
>poster's request. The label property would be a good nice-to-have
>-- obtainable via AppleScript?
Yes but slow for a larger number of files. Would be fine for single
files though.
>>I am also curious about performance when calling this function 50
>>times for a folder with 800 image files.
>
>Why 50 times if the folder contains 800 files?
Just random numbers representing some folder with images. My
impression from the original poster was that he was processing a
subset of files from a larger collection. But these are probably not
applicable here. My bad.
>I wouldn't use that function for multiple files, as it's designed
>for single files
Agreed and it is probably what the original poster wanted as he did
not imply batch processing.
>and it would be much faster to just grab "the detailed files" and
>parse the result for everything at once.
True if all the files were in the same folder.
>In fact, given the overhead of the XCMD interface and the latency
>inherent in file I/O, if you want to get the type and creator code
>for 800 files in a folder I'd guess it would be faster to parse "the
>detailed files" than to call an external designed to work on single
>files that many times.
My program (which is a different case from the original poster since
I am doing batch processing) is working with Rinaldi's externals in
HyperCard (processing mostly labels and aliases) and it is reasonably
fast processing hundreds of files in a multitude of folders. Rev
should not be any slower.
Robert
More information about the use-livecode
mailing list