コード例 #1
0
 /// <summary>
 /// Opens a volume using the file system.
 /// </summary>
 /// <param name="volume">The volume to access</param>
 /// <param name="parameters">Parameters for the file system</param>
 /// <returns>A file system instance</returns>
 public abstract DiscFileSystem Open(VolumeInfo volume, FileSystemParameters parameters);
コード例 #2
0
 /// <summary>
 /// Opens a volume using the file system.
 /// </summary>
 /// <param name="volume">The volume to access</param>
 /// <returns>A file system instance</returns>
 public DiscFileSystem Open(VolumeInfo volume)
 {
     return Open(volume, null);
 }
コード例 #3
0
 /// <summary>
 /// Detect which file systems are present on a volume.
 /// </summary>
 /// <param name="volume">The volume to inspect</param>
 /// <returns>The list of file systems detected.</returns>
 public static FileSystemInfo[] DetectDefaultFileSystems(VolumeInfo volume)
 {
     return s_defaultInstance.DetectFileSystems(volume);
 }
コード例 #4
0
        private FileSystemInfo[] DoDetect(Stream stream, VolumeInfo volume)
        {
            BufferedStream detectStream = new BufferedStream(stream);
            List<FileSystemInfo> detected = new List<FileSystemInfo>();

            foreach (var factory in _factories)
            {
                detected.AddRange(factory.Detect(detectStream, volume));
            }

            return detected.ToArray();
        }
コード例 #5
0
 /// <summary>
 /// Detect which file systems are present on a volume.
 /// </summary>
 /// <param name="volume">The volume to inspect</param>
 /// <returns>The list of file systems detected.</returns>
 public FileSystemInfo[] DetectFileSystems(VolumeInfo volume)
 {
     using (Stream s = volume.Open())
     {
         return DoDetect(s, volume);
     }
 }
コード例 #6
0
 /// <summary>
 /// Detect which file systems are present on a volume.
 /// </summary>
 /// <param name="volume">The volume to inspect</param>
 /// <returns>The list of file systems detected.</returns>
 public static FileSystemInfo[] DetectDefaultFileSystems(VolumeInfo volume)
 {
     return(s_defaultInstance.DetectFileSystems(volume));
 }