random question of the day



So here is today's quiz:

I need to check if certain files exist in a folder or not. So I write the following code:

NautilusFileInfo *selected = (NautilusFileInfo *)data;
    if( nautilus_file_info_is_directory(selected) == FALSE)
        return;

    NautilusDirectory *directory;
    directory = nautilus_directory_get_for_file (selected);
    directory->contains_file();
    nautilus_directory_unref (directory);


But this code does not compile as the NautilusDirectory structure is in a private folder. Is it okay (as in recommended) that I include the path to libnautilus-private/nautilus-directory.h ???
Or this is all wrong and I should be using the GFile API?

TIA
Sunil



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