[CSHARP]using System.IO;[/CSHARP]

[CSHARP] public static void DisplayFileTimestamps(string path) { Console.WriteLine(File.GetCreationTime(path)); Console.WriteLine(File.GetLastAccessTime(path)); Console.WriteLine(File.GetLastWriteTime(path)); }

public static void DisplayFileInfoTimestamps(FileInfo fileInfo) { Console.WriteLine(fileInfo.CreationTime.ToString() ); Console.WriteLine(fileInfo.LastAccessTime.ToString ()); Console.WriteLine(fileInfo.LastWriteTime.ToString( )); }

public static void DisplayFileHiddenAttribute(string path) { if (File.Exists(path)) { FileInfo fileInfo = new FileInfo(path); // Display whether this file is hidden Console.WriteLine("Is file hidden? = " + ((fileInfo.Attributes & FileAttributes.Hidden) == FileAttributes.Hidden)); } } [/CSHARP]