Directory.GetCurrentDirectory()
using System;
using System.IO;
public class DirInfoApp
{
public static void Main(string[] args)
{
DirectoryInfo dir = new DirectoryInfo(Directory.GetCurrentDirectory());
Console.WriteLine("Current Dir: {0}", dir.FullName);
foreach (FileInfo f in dir.GetFiles())
{
Console.WriteLine("{0,-14}{1,10}{2,20}",f.Name, f.Length, f.LastWriteTime);
}
}
}
Related examples in the same category