summaryrefslogtreecommitdiffstats
path: root/examples/gio/directory-async.py
blob: 8962c5a3acc871be9503e63f21f7b2494374a8a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import gobject
import gio

def callback(gfile, result):
    for file_info in gfile.enumerate_children_finish(result):
        print file_info.get_name()
    loop.quit()

gfile = gio.File("/")
gfile.enumerate_children_async("standard::*", callback)

loop = gobject.MainLoop()
loop.run()