/// <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);
/// <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); }
/// <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); }
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(); }
/// <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); } }
/// <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)); }