Is it possible to search for files using spotlight in ruby just like
it's done on the terminal with the command 'mdfind'?
results = `mdfind #{search_string}`
perhaps?
~Wayne
s///g
Wayne E. Seguin
Sr. Systems Architect & Systems Administrator
···
On Sep 22, 2007, at 21:25 , Filipe wrote:
Is it possible to search for files using spotlight in ruby just like
it's done on the terminal with the command 'mdfind'?
You can run any terminal command in ruby (and capture the output) via
a variety of mechanisms. Does that not do what you need?
···
On Sep 22, 7:22 pm, Filipe <filipedlarca...@gmail.com> wrote:
Is it possible to search for files using spotlight in ruby just like
it's done on the terminal with the command 'mdfind'?
For sure. How do I go about running terminal commands and getting
their outputs?
I'm new to this ruby thing.
Thanks in advance
···
On Sep 23, 12:22 am, Phrogz <phr...@mac.com> wrote:
On Sep 22, 7:22 pm, Filipe <filipedlarca...@gmail.com> wrote:
> Is it possible to search for files using spotlight in ruby just like
> it's done on the terminal with the command 'mdfind'?You can run any terminal command in ruby (and capture the output) via
a variety of mechanisms. Does that not do what you need?
Filipe wrote:
For sure. How do I go about running terminal commands and getting
their outputs?
http://groups.google.com/group/ruby-talk-google/msg/45d16a9975851516
Easiest way is output=`command`
HTH,
Sebastian
···
--
NP: Darkkirchensteuer - Sehnsucht
Jabber: sepp2k@jabber.org
ICQ: 205544826