Пример #1
0
        private List <FileSystem> GetMountedFilesystems()
        {
            List <FileSystem> fses = new List <FileSystem>();

            fses.AddRange(FilesystemManager.Instance().GetAllDrives());
            return(fses);
        }
Пример #2
0
        /// <summary>
        /// Builds a "fake" layout containing 1 fake disk, having 1 fake partition,
        /// containing all the mounted available filesystems
        /// </summary>
        /// <returns>
        /// The storage layout.
        /// </returns>
        public StorageLayout BuildStorageLayout()
        {
            var layout = new StorageLayout();
            var disk   = new Disk {
                Path = "?"
            };
            var partition = new Partition {
                Path = "?"
            };

            foreach (FileSystem fs in FilesystemManager.Instance().GetAllDrives())
            {
                partition.AddChild(fs);
            }
            disk.AddChild(partition);
            layout.Entries.Add(disk);
            return(layout);
        }