public static void FileSystemInfo() { DriveInfo[] driveinfo = DriveInfo.GetDrives(); foreach (DriveInfo item in driveinfo) { Console.WriteLine("Drive {0}", item.Name); if (item.IsReady == true) { Console.WriteLine(" File system: {0}", item.DriveFormat); } } SDLLog.OpenFile().WriteLine($"{DateTime.Now}\nScan file system\n@"); Console.WriteLine(); }
public static void DefaultInfo() { DriveInfo[] driveinfo = DriveInfo.GetDrives(); foreach (DriveInfo item in driveinfo) { Console.WriteLine("Drive {0}", item.Name); if (item.IsReady == true) { Console.WriteLine(" Total size of drive: {0, 15} bytes ", item.TotalSize); Console.WriteLine(" Available space to current user:{0, 15} bytes", item.AvailableFreeSpace); } } SDLLog.OpenFile().WriteLine($"{DateTime.Now}\nScan total, available space and volume label of drive\n@"); Console.WriteLine(); }
public static void ParentDir(DirectoryInfo dir) { Console.WriteLine($"Parent directory: {dir.Parent}"); SDLLog.OpenFile().WriteLine($"{DateTime.Now}\nChecking parent directory\nPath: {dir.FullName}\n@"); Console.WriteLine(); }
public static void Time(DirectoryInfo dir) { Console.WriteLine($"Creation time: {dir.CreationTime}"); SDLLog.OpenFile().WriteLine($"{DateTime.Now}\nChecking directory creation time\nPath: {dir.FullName}\n@"); Console.WriteLine(); }