On Mon, 2011-04-11 at 22:49 -0700, Charles Hixson wrote:
> I   can't   figure   out   what   I'm   doing   wrong,   but      
> file_info.get_file_type   always   returns   a   value   of   0   
> (i.e.,   UNKNOWN):

That's correct, because…

> 
> 
> // valac --pkg gio-2.0 walker.vala
> // ./walker
> 
> void  walk (File directory)
> {
>     try
>     {  var enumerator = directory.enumerate_children 
> (FILE_ATTRIBUTE_STANDARD_NAME, 0);

… you don't query for it. Change to FILE_ATTRIBUTE_STANDARD_NAME + "," +
FILE_ATTRIBUTE_STANDARD_TYPE to also get the type.

See http://developer.gnome.org/gio/stable/GFileInfo.html#GFileInfo for
all flags (just remove the G_ prefix) for the vala version.

_______________________________________________
vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to