[Vala] Checking if FileInfo is a directory



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?




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