Sha256: d7c4e5fd37a72ed63eb3906fe87c036709a156b4325fb412189783d866845cd7

Contents?: true

Size: 654 Bytes

Versions: 18

Compression:

Stored size: 654 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

#
# Trivial network interface lister using NetworkManager.
# NetworkManager does not support introspection, so the api is not that sexy.

require "dbus"

bus = DBus::SessionBus.instance

tracker_service = bus.service("org.freedesktop.Tracker")
tracker_manager = tracker_service.object("/org/freedesktop/tracker")
poi = DBus::ProxyObjectInterface.new(tracker_manager, "org.freedesktop.Tracker.Files")
poi.define_method("GetMetadataForFilesInFolder", "in live_query_id:i, in uri:s, in fields:as, out values:aas")
p poi.GetMetadataForFilesInFolder(-1, "#{ENV["HOME"]}/Desktop", ["File:Name", "File:Size"])

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
ruby-dbus-0.24.0 examples/no-introspect/tracker-test.rb
ruby-dbus-0.23.1 examples/no-introspect/tracker-test.rb
ruby-dbus-0.23.0.beta2 examples/no-introspect/tracker-test.rb
ruby-dbus-0.23.0.beta1 examples/no-introspect/tracker-test.rb
ruby-dbus-0.22.1 examples/no-introspect/tracker-test.rb
ruby-dbus-0.22.0 examples/no-introspect/tracker-test.rb
ruby-dbus-0.21.0 examples/no-introspect/tracker-test.rb
ruby-dbus-0.20.0 examples/no-introspect/tracker-test.rb
ruby-dbus-0.19.0 examples/no-introspect/tracker-test.rb
ruby-dbus-0.18.1 examples/no-introspect/tracker-test.rb
ruby-dbus-0.18.0.beta8 examples/no-introspect/tracker-test.rb
ruby-dbus-0.18.0.beta7 examples/no-introspect/tracker-test.rb
ruby-dbus-0.18.0.beta6 examples/no-introspect/tracker-test.rb
ruby-dbus-0.18.0.beta5 examples/no-introspect/tracker-test.rb
ruby-dbus-0.18.0.beta4 examples/no-introspect/tracker-test.rb
ruby-dbus-0.18.0.beta3 examples/no-introspect/tracker-test.rb
ruby-dbus-0.18.0.beta2 examples/no-introspect/tracker-test.rb
ruby-dbus-0.18.0.beta1 examples/no-introspect/tracker-test.rb