Re: [Vala] Listing directory content with GIO
- From: "Sam Liddicott" <sam liddicott com>
- To: Levi Bard <taktaktaktaktaktaktaktaktaktak gmail com>
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] Listing directory content with GIO
- Date: Wed, 06 May 2009 20:05:20 +0100
Yeah... Nicer to be implicit though.
Sam
-----Original Message-----
From: Levi Bard Sent: Wednesday, May 06, 2009 7:48 PM
To: Sam Liddicott <sam liddicott com>
Subject: Re: [Vala] Listing directory content with GIO
On Wed, May 6, 2009 at 2:42 PM, Sam Liddicott <sam liddicott com> wrote:
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 :-(
{
FileInfo fileinfo;
while(null != (fileinfo = enumerator.next_file(null)))
{
// stuff
}
}// ?
--
http://homes.eff.org/~barlow/EconomyOfIdeas.html
http://www.dreamsongs.com/MobSoftware.html
http://www.gnu.org/philosophy/shouldbefree.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]