private void UpdateFileSystem(FileSystemInfo info, DriveInfo drive = null) { Children = new ObservableCollection <FileSystemObjectInfo>(); FileSystemInfo = info; if (FileSystemInfo is DirectoryInfo) { FileInfo = ShellManager.GetFileInfo(FileSystemInfo.FullName, ItemType.Folder, new Size(16, 16)); if ((drive != null && drive.IsReady) || (drive == null && Directory.GetDirectories(FileSystemInfo.FullName).Count() > 0)) { AddDummy(); } } else if (FileSystemInfo is FileInfo) { FileInfo = ShellManager.GetFileInfo(FileSystemInfo.FullName, ItemType.File, new Size(16, 16)); FileInfo.Size = $"{Math.Ceiling(((System.IO.FileInfo)FileSystemInfo).Length / 1024.00).ToString("N0")} KB"; } PropertyChanged += new PropertyChangedEventHandler(FileSystemObjectInfo_PropertyChanged); }