Re: [Vala] [vala][newbie] file_info.get_file_type



On Mo, 2011-04-11 at 22:53 -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):

Yes, and it rightfully does. Because you don't query for it.

You want to query for either "*" - everything, more specifically
"standard::*" for standard properties like size, type etc. or even more
specifically for FILE_ATTRIBUTE_STANDARD_NAME + "," +
FILE_ATTRIBUTE_STANDART_TYPE. For possible constants see:

http://developer.gnome.org/gio/2.28/GFile.html#g-file-enumerate-children
and http://developer.gnome.org/gio/2.28/GFileInfo.html





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]