Re: [Vala] Listing directory content with GIO



I prefer:

while ((FileInfo fileinfo = enumerator.next_file(null)) != null)
{
  stdout.printf("%s\n", fileinfo.get_name());
}

Which allows you to have a fake scope surrounding the loop to keep the loop variable temporary to the loop.

I don't know any language that likes it though :-(

Sam



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