List files in a directory

I am trying to iterate through a directory that contains a number of save game files to list them all. According to some posts I saw around here, I tried this in C#

using UnityEngine;
using System.Collections;
using System.IO;

DirectoryInfo dir = new DirectoryInfo( path );
FileInfo[] info = dir.GetFiles( "*.xml" );

foreach ( FileInfo f in info )
{
	print ( "Found: " + f.Name );
}

It is not working, however, and generates the following compiler error

Does anyone know what I’m doing wrong here?

Switch the platform from web player to something that supports file IO, such as standalone.

–Eric

Okay, I missed the “Switch platform button” in the selector. I had tried that but had not made desktop builds my default. Anyway, that did the trick. Thank you so much.