/* File: recls.d Author: J C Calvarese License: Public Domain Date: 2004-01-23 Purpose: Demonstrate simple usage of the recls library. Make recls.lib using a command line like this... D:\DMD\SRC\PHOBOS\ETC\C\RECLS>make -fwin32.mak Then put recls.lib in the a lib path (probably either \dm\lib or \dmd\lib). Here's the batch file I used to compile and test my recls sample: @echo off dmd recls.d recls.lib pause cd \ \pgm\d\testing\phobos\recls.exe pause Read the recls FAQ: http://recls.org/faq.html */ import std.recls; void main() { Search search = new Search(".", "*.*", RECLS_FLAG.RECLS_F_RECURSIVE); foreach(Entry entry; search) { with(entry) { if(!ShortFile()) printf("%.*s%.*s\n", DirectoryPath(), File()); else printf("%.*s%.*s (%.*s)\n", DirectoryPath(), File(), ShortFile()); } } }