Re: [Vala] Listing directory content with GIO
- From: Levi Bard <taktaktaktaktaktaktaktaktaktak gmail com>
- To: Sam Liddicott <sam liddicott com>
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] Listing directory content with GIO
- Date: Wed, 6 May 2009 14:48:33 -0400
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]