Re: [Vala] Checking if FileInfo is a directory




I think you have to use 'FILE_ATTRIBUTE_STANDARD_NAME + "," +
FILE_ATTRIBUTE_STANDARD_TYPE' instead of 'FILE_ATTRIBUTE_STANDARD_NAME'
Regards
Jörn


Hi everyone, I'm trying to create a program that will go recursively
through the current directory counting the number of lines in each file:
http://pastebin.ca/1920108

to check if the current file is a directory I am using this code:
        File directory = File.new_for_path (path);
        var enumerator = directory.enumerate_children
(FILE_ATTRIBUTE_STANDARD_NAME, 0, null);
        FileInfo file_info;
        while ((file_info = enumerator.next_file(null)) != null) {
            if (file_info.get_type() == FileType.DIRECTORY) { 
              // do stuff
          }

Why isn't this working?

_______________________________________________
vala-list mailing list
vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list





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