#include <Foundation/NSFileManager.h>
#include <Foundation/NSString.h>
#include <Foundation/NSArray.h>
#include <Foundation/NSDate.h>
#include <Foundation/NSEnumerator.h>
#include <Foundation/NSAutoreleasePool.h>

int main(int argc, char *argv[]) 
{
NSAutoreleasePool *arp = [NSAutoreleasePool new];
NSFileManager *fm = [NSFileManager defaultManager];
NSDirectoryEnumerator *enumerator = [fm enumeratorAtPath:@"/etc"];
NSString *file;
NSDictionary *d;
NSArray *a;

	printf("Enumerate files at: /etc\n");
	while (file = [enumerator nextObject])
		printf("  %s\n",[file cString]);

	printf("directoryContentsAtPath: /etc\n");
	a = [fm directoryContentsAtPath:@"/etc"];
	printf("%s\n",[[a description] cString]);

	printf("subpathsAtPath: /etc\n");
	a = [fm subpathsAtPath:@"/etc"];
	printf("%s\n",[[a description] cString]);

	d = [fm fileSystemAttributesAtPath:@"/etc"];
	printf("%s\n",[[d description] cString]);

	[arp release];
	printf("nsfilemanager test complete\n");
	
	exit(0);
}
