private static string GetTypeString(string pth, long sz) { if (sz > 0) { try { return(Filesystem.GetFileType(pth)); } catch { return("File"); } } return(IsDrive(pth) ? "Drive" : "Folder"); }