After installing Tcllib 1.9, I run this script:
package require fileutil::magic::filetype
fileutil::magic::filetype /Users/kevin/Desktop/dndtest.rb
Based on inspection of the source code of the module, I expect the
output to be something like:
mime text/x-ruby
but there's no output at all.
Checking to see if the module is correctly installed, I run this command:
fileutil::magic::filetype
/Users/kevin/Downloads/tcllib-1.19/devdoc/devguide.html
And I get this output:
{{HTML document text}} {text html} {}
So, it seems to be working as designed, at least in this instance.
My use case for this module is to glob a directory and return a list of
files of type "text," to filter out anything that can't be read and
displayed in the text widget. Ruby has a module that does this quite
well, but the particular app here is written in Tcl. However, the silent
failure of the module in some instances gives me pause.
Am I doing something wrong, or is there a bug in this library?
--Kevin
--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com