Exemplo n.º 1
0
        public override string GetDetails(MultiboxFunctionParam args)
        {
            string pth     = AddHDIfNeeded(args, args.MC.LabelManager.CurrentSelection.FullText);
            long   sz      = GetFileSize(pth);
            string sizestr = FormatSizestr(sz);
            string typ     = GetTypeString(pth, sz);

            if (sz <= 0 && IsDrive(pth))
            {
                try
                {
                    foreach (Drive di in Filesystem.GetDrives())
                    {
                        if (!di.Name.Equals(pth))
                        {
                            continue;
                        }
                        sizestr = FormatSizestr(di.TotalSize - di.TotalFreeSpace) + " / " + FormatSizestr(di.TotalSize);
                        break;
                    }
                }
                catch { }
            }
            string lmd = "";

            try
            {
                DateTime lmddt = Filesystem.GetFileLastWriteTime(pth);
                lmd = lmddt.ToShortDateString() + " " + lmddt.ToLongTimeString();
            }
            catch { }
            return("Name: " + args.MC.LabelManager.CurrentSelection.DisplayText + "\nType: " + typ + "\nSize: " + sizestr + "\nLast Modified: " + lmd);
        }