1
0
mirror of https://github.com/openSUSE/snapper.git synced 2026-02-06 00:45:39 +01:00
Files
snapper/examples/ruby/get-files.rb
Arvin Schnell f6df5c2c31 - fixed example
2013-08-22 15:32:19 +02:00

21 lines
424 B
Ruby
Executable File

#!/usr/bin/ruby
require "dbus"
system_bus = DBus::SystemBus.instance
service = system_bus.service("org.opensuse.Snapper")
dbus_object = service.object("/org/opensuse/Snapper")
dbus_object.introspect
dbus_object.default_iface = "org.opensuse.Snapper"
dbus_object.send("CreateComparison", "root", 1, 2)
files = dbus_object.send("GetFiles", "root", 1, 2)[0]
files.each do |file|
print file[0], " ", file[1], "\n"
end