I've tried to list the files in a directory (not using async functions). This is what I've got:
var libPath = File.new_for_path("/lib/"); var enumerator = libPath.enumerate_children(FILE_ATTRIBUTE_STANDARD_NAME, 0, null); var fileinfo = enumerator.next_file(null); while(fileinfo != null) { stdout.printf("%s\n", fileinfo.get_name()); fileinfo = enumerator.next_file(null); } Is there an easier way of doing it? I don't like that I have "fileinfo = enumerator.next_file(null);" two times in my code. I also found two minor glitches in the doc. 1. At the bottom of the page the constants are over the text on the right: http://valadoc.org/?pkg=gio-2.0&element=GLib 2. A space is missing before GLib.FileEnumerator: http://valadoc.org/?pkg=gio-2.0&element=GLib.File.enumerate_children _______________________________________________ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list